STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 5)
-SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 6)
+SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
CMAKE_DEPENDENT_OPTION(SALOME_USE_MPI "Use MPI containers" ${SALOME_USE_MPI}
"NOT SALOME_LIGHT_ONLY" OFF)
MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_USE_SIMAN SALOME_PACO_PARALLEL SALOME_USE_PORTMANAGER)
-SET(SALOME_LAUNCHER_ONLY OFF) # deprecated option: Build only the Launcher part
# Required prerequisites
# Find "big" prerequisites first - they reference themselves many others
# List of targets in this project we want to make visible to the rest of the world.
# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
-IF(SALOME_LAUNCHER_ONLY)
- SET(_${PROJECT_NAME}_exposed_targets
- SALOMEBasics ResourcesManager Launcher)
-ELSE()
- SET(_${PROJECT_NAME}_exposed_targets
- SALOMEBasics SALOMELocalTrace SalomeHDFPersist OpUtil)
+SET(_${PROJECT_NAME}_exposed_targets
+ SALOMEBasics SALOMELocalTrace SalomeHDFPersist OpUtil)
- # CORBA specific targets:
- IF(NOT SALOME_LIGHT_ONLY)
+# CORBA specific targets:
+IF(NOT SALOME_LIGHT_ONLY)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ DF SalomeLoggerServer with_loggerTraceCollector SalomeNS SalomeGenericObj
+ Registry SalomeCatalog ResourcesManager SalomeResourcesManager
+ SalomeNotification SalomeContainer SalomeSDS Launcher SalomeLauncher
+ SalomeLifeCycleCORBA SalomeDSClient TOOLSDS SalomeKernelHelpers
+ SalomeDSImpl SalomeDS SalomeCommunication SalomeDSCContainer)
+ # Temporary solution for package src\DSC on windows
+ IF(NOT WIN32)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
- DF SalomeLoggerServer with_loggerTraceCollector SalomeNS SalomeGenericObj
- Registry SalomeCatalog ResourcesManager SalomeResourcesManager
- SalomeNotification SalomeContainer SalomeSDS Launcher SalomeLauncher
- SalomeLifeCycleCORBA SalomeDSClient TOOLSDS SalomeKernelHelpers
- SalomeDSImpl SalomeDS SalomeCommunication SalomeDSCContainer)
- # Temporary solution for package src\DSC on windows
- IF(NOT WIN32)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
- CalciumC SalomeCalcium SalomeDatastream SalomePalm SalomeDSCSupervBasic
- SalomeDSCSuperv)
- IF(SALOME_PACO_PARALLEL)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeParallelDSCContainer)
- ENDIF()
+ CalciumC SalomeCalcium SalomeDatastream SalomePalm SalomeDSCSupervBasic
+ SalomeDSCSuperv)
+ IF(SALOME_PACO_PARALLEL)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeParallelDSCContainer)
ENDIF()
ENDIF()
+ENDIF()
- # MPI specific targets:
- IF(SALOME_USE_MPI)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
- SalomeMPIContainer SalomeTestMPIComponentEngine)
- ENDIF()
+# MPI specific targets:
+IF(SALOME_USE_MPI)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ SalomeMPIContainer SalomeTestMPIComponentEngine)
+ENDIF()
- # Test targets:
- IF(SALOME_BUILD_TESTS)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SALOMELocalTraceTest UnitTests)
- IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
- SALOMETraceCollectorTest UtilsTest NamingServiceTest SalomeTestComponentEngine
- LifeCycleCORBATest SalomeKernelHelpersTest SALOMEDSImplTest SALOMEDSTest)
- ENDIF()
+# Test targets:
+IF(SALOME_BUILD_TESTS)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets SALOMELocalTraceTest UnitTests)
+ IF(NOT SALOME_LIGHT_ONLY)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ SALOMETraceCollectorTest UtilsTest NamingServiceTest SalomeTestComponentEngine
+ LifeCycleCORBATest SalomeKernelHelpersTest SALOMEDSImplTest SALOMEDSTest)
ENDIF()
+ENDIF()
- # PACO specific targets:
- IF(SALOME_PACO_PARALLEL)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeParallelContainer)
- ENDIF()
+# PACO specific targets:
+IF(SALOME_PACO_PARALLEL)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeParallelContainer)
ENDIF()
IF(NOT SALOME_LIGHT_ONLY)
modules_tag = "modules"
module_tag = "module"
samples_tag = "samples"
+extra_tests_tag = "extra_tests"
+extra_test_tag = "extra_test"
resources_tag = "resources"
# --- names of attributes in XML configuration file
self.config = {}
self.config["modules"] = []
self.config["guimodules"] = []
+ self.config["extra_tests"] = []
parser = xml.sax.make_parser()
parser.setContentHandler(self)
parser.parse(fileName)
self.config["guimodules"].append(nam)
pass
pass
+ # --- if we are analyzing "extra_test" element then store its "name" and "path" attributes
+ elif self.space == [appli_tag,extra_tests_tag,extra_test_tag] and \
+ nam_att in attrs.getNames() and \
+ path_att in attrs.getNames():
+ nam = attrs.getValue( nam_att )
+ path = attrs.getValue( path_att )
+ self.config["extra_tests"].append(nam)
+ self.config[nam]=path
+ pass
pass
def endElement(self, name):
pass
pass
+ for extra_test in _config.get("extra_tests", []):
+ if _config.has_key(extra_test):
+ print "--- add extra test ", extra_test, _config[extra_test]
+ options = params()
+ options.verbose = verbose
+ options.clear = 0
+ options.prefix = home_dir
+ options.extra_test_name = extra_test
+ options.extra_test_path = _config[extra_test]
+ virtual_salome.link_extra_test(options)
+ pass
+ pass
+
appliskel_dir = os.path.join(home_dir, 'bin', 'salome', 'appliskel')
for fn in ('envd',
# Both display process stdout&stderr to console and capture them to variables
def __runTest(command, workdir):
- p = subprocess.Popen(command, cwd=workdir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=1)
+ p = subprocess.Popen(command, cwd=workdir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
stdout = []
stderr = []
f.write("SUBDIRS(%s)\n"%options.module_name)
else:
if verbose:
- print module_bin_dir, " doesn't exist"
+ print module_test_dir, " doesn't exist"
pass
#directory idl/salome : create it and link content
pass
pass
+def link_extra_test(options):
+ global verbose
+
+ if not options.extra_test_path:
+ print "Option extra_test is mandatory"
+ return
+
+ extra_test_dir=os.path.abspath(options.extra_test_path)
+ if not os.path.exists(extra_test_dir):
+ print "Test %s does not exist" % extra_test_dir
+ return
+
+ verbose = options.verbose
+
+ home_dir = os.path.expanduser(options.prefix)
+ test_dir = os.path.join(home_dir,'bin','salome', 'test')
+
+ if options.clear:
+ rmtree(test_dir)
+ pass
+
+ #directory bin/salome/test : create it and link content
+ if os.path.exists(extra_test_dir):
+ # link <appli_path>/bin/salome/test/<extra_test> to <extra_test_path>/bin/salome/test
+ print "link %s --> %s"%(os.path.join(test_dir, options.extra_test_name), extra_test_dir)
+ symlink(extra_test_dir, os.path.join(test_dir, options.extra_test_name))
+ # register extra_test for testing in CTestTestfile.cmake
+ with open(os.path.join(test_dir, "CTestTestfile.cmake"), "ab") as f:
+ f.write("SUBDIRS(%s)\n"%options.extra_test_name)
+ else:
+ if verbose:
+ print extra_test_dir, " doesn't exist"
+ pass
+
# -----------------------------------------------------------------------------
def main():
ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE})
INSTALL(CODE "FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KERNEL)")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KERNEL DESTINATION ${SALOME_INSTALL_DOC}/tui)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KERNEL
+ DESTINATION ${SALOME_INSTALL_DOC}/tui
+ PATTERN "*.md5" EXCLUDE
+ PATTERN "*.map" EXCLUDE)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/head.png DESTINATION ${SALOME_INSTALL_DOC}/tui/KERNEL)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES KERNEL)
SALOME_CONFIGURE_FILE(CatalogResources.xml.in CatalogResources.xml INSTALL ${SALOME_KERNEL_INSTALL_RES_DATA})
-IF(NOT SALOME_LAUNCHER_ONLY)
- INSTALL(FILES channel.cfg SALOMEDS_Resources DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
- SALOME_CONFIGURE_FILE(KERNELCatalog.xml.in KERNELCatalog.xml INSTALL ${SALOME_KERNEL_INSTALL_RES_DATA})
-ENDIF()
+INSTALL(FILES channel.cfg SALOMEDS_Resources DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
+SALOME_CONFIGURE_FILE(KERNELCatalog.xml.in KERNELCatalog.xml INSTALL ${SALOME_KERNEL_INSTALL_RES_DATA})
pass
# --
newlines.append("""
- set(VERSION 7.5.1)
- set(SHORT_VERSION 7.5)
- set(XVERSION 0x070501)
- set(VERSION_DEV 1)
+ set(VERSION 7.6.0)
+ set(SHORT_VERSION 7.6)
+ set(XVERSION 0x070600)
+ set(VERSION_DEV 0)
""")
pass
# --
l = l.replace( '[VERSION]', options.version )
l = l.replace( '[SLOGAN]', options.slogan )
l = l.replace( '[NAME_OF_APPLICATION]', options.name.upper() )
- l = l.replace( '<Name_of_Application>', options.name )
+ l = l.replace( '[Name_of_Application]', options.name )
l = l.replace( '(name_of_application)', options.name.lower() )
fout.write( l )
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
-PROJECT(Salome_<Name_of_Application>_Profile C CXX)
+PROJECT(Salome_[Name_of_Application]_Profile C CXX)
# Ensure a proper linker behavior:
CMAKE_POLICY(SET CMP0003 NEW)
# User options
# ============
OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
-OPTION(SALOME_BUILD_DOC "Generate SALOME <Name_of_Application> documentation" ON)
+OPTION(SALOME_BUILD_DOC "Generate SALOME [Name_of_Application] documentation" ON)
IF(SALOME_BUILD_TESTS)
ENABLE_TESTING()
${KERNEL_ROOT_DIR}/bin/salome/parseConfigFile.py
)
SALOME_INSTALL_SCRIPTS("${_salome_context_API_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})
+SET(_salome_context_BASHRC
+ ${KERNEL_ROOT_DIR}/bin/salome/appliskel/.bashrc
+)
+SALOME_INSTALL_SCRIPTS("${_salome_context_BASHRC}" $ENV{[NAME_OF_APPLICATION]_PROFILE_ROOT_DIR})
-This directory contains the sources of <Name_of_Application>'s documentation
+This directory contains the sources of [Name_of_Application]'s documentation
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
- ('index', '(name_of_application).tex', '<Name_of_Application> User Documentation', 'A. Ribes', 'manual')
+ ('index', '(name_of_application).tex', '[Name_of_Application] User Documentation', 'A. Ribes', 'manual')
]
# The name of an image file (relative to this directory) to place at the top of
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-<Name_of_Application>'s documentation
+[Name_of_Application]'s documentation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Outline
Introduction
==========================================
-Welcome to <Name_of_Application>'s documentation!
+Welcome to [Name_of_Application]'s documentation!
<parameter name="standalone" value=""/>
</section>
<section name="splash">
- <parameter name="image" value="%<Name_of_Application>_PROFILE_ROOT_DIR%/share/salome/resources/(name_of_application)_profile/splash.png"/>
+ <parameter name="image" value="%[Name_of_Application]_PROFILE_ROOT_DIR%/share/salome/resources/(name_of_application)_profile/splash.png"/>
<parameter name="text_colors" value="#ffffff|#000000"/>
<parameter name="show_percents" value="yes"/>
<parameter name="show_progress" value="yes"/>
<parameter name="font" value="Xirod,12,normal"/>
</section>
<section name="resources">
- <parameter name="LightApp" value="%<Name_of_Application>_PROFILE_ROOT_DIR%/share/salome/resources/(name_of_application)_profile"/>
+ <parameter name="LightApp" value="%[Name_of_Application]_PROFILE_ROOT_DIR%/share/salome/resources/(name_of_application)_profile"/>
</section>
</document>
-This directory contains binaries of <Name_of_Application>'s documentation
+This directory contains binaries of [Name_of_Application]'s documentation
LightApp_images.ts
LightApp_msg_en.ts
LightApp_msg_fr.ts
+ LightApp_msg_ja.ts
)
# --- rules ---
</message>
<message>
<source>ABOUT_CAPTION</source>
- <translation>About <Name_of_Application></translation>
+ <translation>About [Name_of_Application]</translation>
</message>
<message>
<source>APP_NAME</source>
- <translation><Name_of_Application> [SLOGAN]</translation>
+ <translation>[Name_of_Application] [SLOGAN]</translation>
</message>
<message>
<source>APP_VERSION</source>
</message>
<message>
<source>ABOUT_TITLE</source>
- <translation><Name_of_Application></translation>
+ <translation>[Name_of_Application]</translation>
</message>
</context>
</TS>
</message>
<message>
<source>ABOUT_CAPTION</source>
- <translation>A propos de <Name_of_Application></translation>
+ <translation>A propos de [Name_of_Application]</translation>
</message>
<message>
<source>APP_NAME</source>
- <translation><Name_of_Application> [SLOGAN]</translation>
+ <translation>[Name_of_Application] [SLOGAN]</translation>
</message>
<message>
<source>APP_VERSION</source>
</message>
<message>
<source>ABOUT_TITLE</source>
- <translation><Name_of_Application></translation>
+ <translation>[Name_of_Application]</translation>
</message>
</context>
</TS>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+ <context>
+ <name>@default</name>
+ <message>
+ <source>ABOUT_COPYRIGHT</source>
+ <translation>Copyright (C)</translation>
+ </message>
+ <message>
+ <source>ABOUT_CAPTION</source>
+ <translation>About [Name_of_Application]</translation>
+ </message>
+ <message>
+ <source>APP_NAME</source>
+ <translation>[Name_of_Application] [SLOGAN]</translation>
+ </message>
+ <message>
+ <source>APP_VERSION</source>
+ <translation>V[VERSION]</translation>
+ </message>
+ <message>
+ <source>ABOUT_LICENSE</source>
+ <translation>License description</translation>
+ </message>
+ <message>
+ <source>ABOUT_VERSION</source>
+ <translation>Version [VERSION]</translation>
+ </message>
+ <message>
+ <source>ABOUT_TITLE</source>
+ <translation>[Name_of_Application]</translation>
+ </message>
+ </context>
+</TS>
-This directory contains the tests of <Name_of_Application>
+This directory contains the tests of [Name_of_Application]
)
SET(SUBDIR_CPPUNIT_GENERAL UnitTests)
-IF(SALOME_LAUNCHER_ONLY)
- SET(SUBDIRS Basics ResourcesManager Launcher)
-ELSE()
- SET(SUBDIRS ${SUBDIR_BASE})
- IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND SUBDIRS ${SUBDIR_CORBA})
- ENDIF()
+SET(SUBDIRS ${SUBDIR_BASE})
+IF(NOT SALOME_LIGHT_ONLY)
+ LIST(APPEND SUBDIRS ${SUBDIR_CORBA})
+ENDIF()
- IF(SALOME_USE_MPI)
- LIST(APPEND SUBDIRS ${SUBDIR_MPI})
- ENDIF(SALOME_USE_MPI)
+IF(SALOME_USE_MPI)
+ LIST(APPEND SUBDIRS ${SUBDIR_MPI})
+ENDIF(SALOME_USE_MPI)
- IF(SALOME_BUILD_TESTS)
- LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_BASE} ${SUBDIR_CPPUNIT_GENERAL})
- IF(NOT SALOME_LIGHT_ONLY)
- LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_CORBA})
- ENDIF()
+IF(SALOME_BUILD_TESTS)
+ LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_BASE} ${SUBDIR_CPPUNIT_GENERAL})
+ IF(NOT SALOME_LIGHT_ONLY)
+ LIST(APPEND SUBDIRS ${SUBDIR_CPPUNIT_CORBA})
ENDIF()
+ENDIF()
- IF(SALOME_PACO_PARALLEL)
- LIST(APPEND SUBDIRS ${SUBDIR_PARALLEL})
- ENDIF()
+IF(SALOME_PACO_PARALLEL)
+ LIST(APPEND SUBDIRS ${SUBDIR_PARALLEL})
ENDIF()
# For salome test
FOREACH(_dir ${SUBDIRS})
ADD_SUBDIRECTORY(${_dir})
-ENDFOREACH()
\ No newline at end of file
+ENDFOREACH()
std::list<std::string>::const_iterator it;
for ( it = _tmp_files.begin(); it != _tmp_files.end(); ++it ) {
#ifdef WIN32
- std::string command = "del /F ";
+ std::string command = "del /F /P";
#else
std::string command = "rm -rf ";
#endif
${OMNIORB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
- ${MPI_CXX_INCLUDE_PATH}
${LIBBATCH_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}/salome_adm
${CMAKE_CURRENT_SOURCE_DIR}/../Basics
${PROJECT_BINARY_DIR}/idl
)
-ADD_DEFINITIONS(${MPI_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
IF(SALOME_USE_LIBBATCH)
ADD_DEFINITIONS(-DWITH_LIBBATCH)
ENDIF(SALOME_USE_LIBBATCH)
SALOMEBasics
SalomeIDLKernel
${LIBBATCH_LIBRARIES}
- ${MPI_CXX_LIBRARIES}
${OMNIORB_LIBRARIES}
${LIBXML2_LIBRARIES}
${PYTHON_LIBRARIES}
)
ADD_LIBRARY(Launcher ${Launcher_SOURCES})
-TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBRARIES} ${MPI_CXX_LIBRARIES} ${LIBXML2_LIBS})
+TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBRARIES} ${LIBXML2_LIBS})
INSTALL(TARGETS Launcher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
SET(TestLauncher_LIBS
${LIBXML2_LIBRARIES}
ResourcesManager
Launcher
- OpUtil
${LIBBATCH_LIBRARIES}
)
+# TestLauncher needs only (and must need only) libxml, libbatch, ResourceManager and Launcher libraries!
ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
INSTALL(TARGETS TestLauncher DESTINATION ${SALOME_INSTALL_BINS})
-IF(NOT SALOME_LAUNCHER_ONLY)
- ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
- TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
- INSTALL(TARGETS SalomeLauncher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
+TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
+INSTALL(TARGETS SalomeLauncher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
- SET(SALOME_LauncherServer_LIBS
- Launcher
- SalomeLauncher
- SalomeSDS
- SALOMEBasics
- SALOMELocalTrace
- ${LIBBATCH_LIBRARIES}
- ${MPI_CXX_LIBRARIES}
- ${OMNIORB_LIBRARIES}
- ${LIBXML2_LIBRARIES}
- ${PYTHON_LIBRARIES}
- )
+SET(SALOME_LauncherServer_LIBS
+ Launcher
+ SalomeLauncher
+ SalomeSDS
+ SALOMEBasics
+ SALOMELocalTrace
+ ${LIBBATCH_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+)
- ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
- TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
- INSTALL(TARGETS SALOME_LauncherServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
-ENDIF()
+ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
+TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
+INSTALL(TARGETS SALOME_LauncherServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
SET(COMMON_HEADERS_HXX
BatchTest.hxx
SALOME_Launcher_defs.hxx
)
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES testLauncher.xml DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})
//
#include "Launcher.hxx"
+#include <iostream>
+#include <string>
int main(int argc, char** argv)
{
+ std::string xmlfile("");
try {
Launcher_cpp *lcpp = new Launcher_cpp();
ResourcesManager_cpp *rcpp = new ResourcesManager_cpp();
lcpp->SetResourcesManager(rcpp);
+ if(!getenv("KERNEL_ROOT_DIR"))
+ throw ResourcesException("you must define KERNEL_ROOT_DIR environment variable!! -> cannot load testLauncher.xml");
+ xmlfile = getenv("KERNEL_ROOT_DIR");
+ xmlfile += "/share/salome/resources/kernel/testLauncher.xml";
+
+ long jobid = lcpp->createJobWithFile(xmlfile.c_str(),"localhost");
+ lcpp->launchJob(jobid);
delete lcpp;
delete rcpp;
std::cout << "test OK" << std::endl;
--- /dev/null
+<main>
+ <machine-list>
+ <machine work-directory="/tmp/testLauncher">localhost</machine>
+ </machine-list>
+ <nb-processes>1</nb-processes>
+ <output-file>testLauncher.output</output-file>
+ <command>ls > testLauncher.output</command>
+</main>
+
+
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${LIBXML2_DEFINITIONS})
ADD_LIBRARY(ResourcesManager ${ResourcesManager_SOURCES})
-TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML2_LIBRARIES})
+TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics ${LIBXML2_LIBRARIES})
INSTALL(TARGETS ResourcesManager EXPORT ${PROJECT_NAME}TargetGroup
DESTINATION ${SALOME_INSTALL_LIBS})
-IF(NOT SALOME_LAUNCHER_ONLY)
- SET(SalomeResourcesManager_SOURCES
- SALOME_ResourcesManager.cxx
- SALOME_ResourcesManager_Client.cxx
- SALOME_ResourcesManager_Common.cxx
- )
- ADD_LIBRARY(SalomeResourcesManager ${SalomeResourcesManager_SOURCES})
- TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
- INSTALL(TARGETS SalomeResourcesManager EXPORT ${PROJECT_NAME}TargetGroup
+SET(SalomeResourcesManager_SOURCES
+ SALOME_ResourcesManager.cxx
+ SALOME_ResourcesManager_Client.cxx
+ SALOME_ResourcesManager_Common.cxx
+)
+ADD_LIBRARY(SalomeResourcesManager ${SalomeResourcesManager_SOURCES})
+TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
+INSTALL(TARGETS SalomeResourcesManager EXPORT ${PROJECT_NAME}TargetGroup
DESTINATION ${SALOME_INSTALL_LIBS})
-ENDIF()
SET(COMMON_HEADERS_HXX
ResourcesManager.hxx
#include <algorithm>
-#include "Utils_SALOME_Exception.hxx"
-
#define MAX_SIZE_FOR_HOSTNAME 256;
using namespace std;
void
ResourcesManager_cpp::AddResourceInCatalog(const ParserResourcesType & new_resource)
{
- if (new_resource.Name == DEFAULT_RESOURCE_NAME)
- throw SALOME_Exception((string("Cannot modify default local resource \"") +
- DEFAULT_RESOURCE_NAME + "\"").c_str());
+ if (new_resource.Name == DEFAULT_RESOURCE_NAME){
+ std::string error("Cannot modify default local resource \"" + DEFAULT_RESOURCE_NAME + "\"");
+ throw ResourcesException(error);
+ }
// TODO - Add minimal check
_resourcesList[new_resource.Name] = new_resource;
}
void ResourcesManager_cpp::DeleteResourceInCatalog(const char * name)
{
- if (DEFAULT_RESOURCE_NAME == name)
- throw SALOME_Exception((string("Cannot delete default local resource \"") +
- DEFAULT_RESOURCE_NAME + "\"").c_str());
+ if (DEFAULT_RESOURCE_NAME == name){
+ std::string error("Cannot delete default local resource \"" + DEFAULT_RESOURCE_NAME + "\"");
+ throw ResourcesException(error);
+ }
MapOfParserResourcesType_it it = _resourcesList.find(name);
if (it != _resourcesList.end())
_resourcesList.erase(name);
std::vector<std::string> resourceList;
};
-class RESOURCESMANAGER_EXPORT ResourcesException
-{
-public:
- const std::string msg;
-
- ResourcesException(const std::string m) : msg(m) {}
-};
-
class RESOURCESMANAGER_EXPORT ResourcesManager_cpp
{
//
#include "SALOME_ResourcesCatalog_Handler.hxx"
#include "Basics_Utils.hxx"
-#include "Utils_SALOME_Exception.hxx"
#include <iostream>
#include <sstream>
#include <map>
{
resource.setAccessProtocolTypeStr((const char *)protocol);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl;
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl;
{
resource.setClusterInternalProtocolStr((const char *)iprotocol);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl;
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl;
{
resource.setResourceTypeStr((const char*)type);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
cerr << "Warning, invalid type \"" << (const char*)type << "\" for resource \"" <<
resource.Name << "\", using default value \"" << resource.getResourceTypeStr() <<
{
resource.setAccessProtocolTypeStr((const char *)protocol);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
cerr << "Warning, invalid protocol \"" << (const char*)protocol << "\" for resource \"" <<
resource.Name << "\", using default value \"" <<
{
resource.setClusterInternalProtocolStr((const char *)iprotocol);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
cerr << "Warning, invalid internal protocol \"" << (const char*)iprotocol <<
"\" for resource \"" << resource.Name << "\", using default value \"" <<
{
resource.setBatchTypeStr((const char *)batch);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
cerr << "Warning, invalid batch manager \"" << (const char*)batch <<
"\" for resource \"" << resource.Name << "\", using default value \"" <<
{
resource.setMpiImplTypeStr((const char *)mpi);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
cerr << "Warning, invalid MPI implementation \"" << (const char*)mpi <<
"\" for resource \"" << resource.Name << "\", using default value \"" <<
{
resource.setCanLaunchBatchJobsStr((const char *)can_launch_batch_jobs);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
cerr << "Warning, invalid can_launch_batch_jobs parameter value \"" <<
(const char*)can_launch_batch_jobs << "\" for resource \"" << resource.Name <<
{
resource.setCanRunContainersStr((const char *)can_run_containers);
}
- catch (const SALOME_Exception & e)
+ catch (const ResourcesException & e)
{
cerr << "Warning, invalid can_run_containers parameter value \"" <<
(const char*)can_run_containers << "\" for resource \"" << resource.Name <<
//
#include "SALOME_ResourcesCatalog_Parser.hxx"
-#include "Utils_SALOME_Exception.hxx"
#include <iostream>
#include <sstream>
case blaunch:
return "blaunch";
default:
- throw SALOME_Exception("Unknown protocol");
+ throw ResourcesException("Unknown protocol");
}
}
else if (protocolStr == "blaunch")
return blaunch;
else
- throw SALOME_Exception((string("Unknown protocol ") + protocolStr).c_str());
+ throw ResourcesException((string("Unknown protocol ") + protocolStr).c_str());
}
ostream & operator<<(ostream &os, const ParserResourcesType &prt)
case single_machine:
return "single_machine";
default:
- throw SALOME_Exception("Unknown resource type");
+ throw ResourcesException("Unknown resource type");
}
}
case coorm:
return "coorm";
default:
- throw SALOME_Exception("Unknown batch type");
+ throw ResourcesException("Unknown batch type");
}
}
case prun:
return "prun";
default:
- throw SALOME_Exception("Unknown MPI implementation type");
+ throw ResourcesException("Unknown MPI implementation type");
}
}
else if (resourceTypeStr == "single_machine")
type = single_machine;
else
- throw SALOME_Exception((string("Unknown resource type ") + resourceTypeStr).c_str());
+ throw ResourcesException((string("Unknown resource type ") + resourceTypeStr).c_str());
}
void ParserResourcesType::setBatchTypeStr(const string & batchTypeStr)
else if (batchTypeStr == "" || batchTypeStr == "none" || batchTypeStr == "ssh_batch")
Batch = none;
else
- throw SALOME_Exception((string("Unknown batch type ") + batchTypeStr).c_str());
+ throw ResourcesException((string("Unknown batch type ") + batchTypeStr).c_str());
}
void ParserResourcesType::setMpiImplTypeStr(const string & mpiImplTypeStr)
else if (mpiImplTypeStr == "" || mpiImplTypeStr == "no mpi")
mpi = nompi;
else
- throw SALOME_Exception((string("Unknown MPI implementation type ") + mpiImplTypeStr).c_str());
+ throw ResourcesException((string("Unknown MPI implementation type ") + mpiImplTypeStr).c_str());
}
void ParserResourcesType::setClusterInternalProtocolStr(const string & internalProtocolTypeStr)
else if (canLaunchBatchJobsStr == "false")
can_launch_batch_jobs = false;
else
- throw SALOME_Exception((string("Invalid boolean value for can_launch_batch_jobs: ") +
+ throw ResourcesException((string("Invalid boolean value for can_launch_batch_jobs: ") +
canLaunchBatchJobsStr).c_str());
}
else if (canRunContainersStr == "false")
can_run_containers = false;
else
- throw SALOME_Exception((string("Invalid boolean value for can_run_containers: ") +
+ throw ResourcesException((string("Invalid boolean value for can_run_containers: ") +
canRunContainersStr).c_str());
}
enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, ompi, slurmmpi, prun};
+class RESOURCESMANAGER_EXPORT ResourcesException
+{
+public:
+ const std::string msg;
+
+ ResourcesException(const std::string m) : msg(m) {}
+};
+
class RESOURCESMANAGER_EXPORT ResourceDataToSort
{