*/
string job_file;
- //! Pre processing command.
- /*! This command is called on the remote resource, from #work_directory, after
+ //! Pre processing script.
+ /*! This script is called on the remote resource, from #work_directory, after
the copy of #in_files and before submiting the job.
*/
string pre_command;
${PROJECT_BINARY_DIR}/idl
)
-ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
IF(SALOME_USE_LIBBATCH)
ADD_DEFINITIONS(-DWITH_LIBBATCH)
ENDIF(SALOME_USE_LIBBATCH)
SALOMELocalTrace
SALOMEBasics
SalomeIDLKernel
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
${LIBBATCH_LIBRARIES}
${OMNIORB_LIBRARIES}
${LIBXML2_LIBRARIES}
ResourcesManager
Launcher
${LIBBATCH_LIBRARIES}
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
)
# TestLauncher needs only (and must need only) libxml, libbatch, ResourceManager and Launcher libraries!
//#define _DEBUG_
#include "Launcher_Job.hxx"
#include "Launcher.hxx"
+#include <boost/filesystem.hpp>
#ifdef WITH_LIBBATCH
#include <libbatch/Constants.hxx>
}
}
params[Batch::WORKDIR] = _work_directory;
- params[Batch::PREPROCESS] = _pre_command;
+ std::string libbatch_pre_command("");
+ if(!_pre_command.empty())
+ {
+ boost::filesystem::path pre_command_path(_pre_command);
+ libbatch_pre_command += "./" + pre_command_path.filename().string();
+ }
+ params[Batch::PREPROCESS] = libbatch_pre_command;
// Parameters for COORM
params[Batch::LAUNCHER_FILE] = _launcher_file;
in_files.push_back(_job_file);
if (_env_file != "")
in_files.push_back(_env_file);
+ if(!_pre_command.empty())
+ in_files.push_back(_pre_command);
for(std::list<std::string>::iterator it = in_files.begin(); it != in_files.end(); it++)
{
std::string file = *it;
IF(NOT WIN32)
SET(TEST_NAME ${COMPONENT_NAME}_Launcher)
- ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} test_launcher.py)
+ ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} 2000 test_launcher.py)
SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
# TIMEOUT 500
)
mkdir_p(case_test_dir)
# command to be run before the job
- pre_command = "echo 'it works!' > in.txt"
+ pre_command = "pre_command.sh"
+ pre_command_text = "echo 'it works!' > in.txt"
+ abs_pre_command_file = os.path.join(case_test_dir, pre_command)
+ f = open(abs_pre_command_file, "w")
+ f.write(pre_command_text)
+ f.close()
+ os.chmod(abs_pre_command_file, 0o755)
# job script
script_file = "myTestScript.py"