]> SALOME platform Git repositories - tools/libbatch.git/blob - src/Local/Test/CMakeLists.txt
Salome HOME
Added Windows implementation for local submission based on sh and rsh (partial and...
[tools/libbatch.git] / src / Local / Test / CMakeLists.txt
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 #  This library is free software; you can redistribute it and/or
7 #  modify it under the terms of the GNU Lesser General Public
8 #  License as published by the Free Software Foundation; either
9 #  version 2.1 of the License.
10 #
11 #  This library is distributed in the hope that it will be useful,
12 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 #  Lesser General Public License for more details.
15 #
16 #  You should have received a copy of the GNU Lesser General Public
17 #  License along with this library; if not, write to the Free Software
18 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22
23 # Declare the configuration variables for the test scripts
24 SET (TEST_LOCAL_SH_WORK_DIR "/tmp" CACHE STRING
25      "Work directory for SH Batch test (only necessary for test target)")
26
27 SET (TEST_LOCAL_RSH_EXECUTION_HOST "localhost" CACHE STRING
28      "Execution host for RSH Batch test (only necessary for test target)")
29 SET (TEST_LOCAL_RSH_USER $ENV{USER} CACHE STRING
30      "User name on the execution host for RSH Batch test (only necessary for test target)")
31 SET (TEST_LOCAL_RSH_WORK_DIR "/tmp" CACHE STRING
32      "Work directory for RSH Batch test (only necessary for test target)")
33
34 SET (TEST_LOCAL_SSH_EXECUTION_HOST "localhost" CACHE STRING
35      "Execution host for SSH Batch test (only necessary for test target)")
36 SET (TEST_LOCAL_SSH_WORK_DIR "/tmp" CACHE STRING
37      "Work directory for SSH Batch test (only necessary for test target)")
38
39 # Configure the config file for all the test scripts
40 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Test_Local_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Test_Local_config.h)
41
42 # Just copy the test scripts to the binary dir
43 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/seta.sh ${CMAKE_CURRENT_BINARY_DIR}/seta.sh COPYONLY)
44 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/setb.sh ${CMAKE_CURRENT_BINARY_DIR}/setb.sh COPYONLY)
45 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test-script.sh ${CMAKE_CURRENT_BINARY_DIR}/test-script.sh COPYONLY)
46
47 # set the include directories
48 include_directories(${CMAKE_SOURCE_DIR}/src/Core)
49 include_directories(${CMAKE_CURRENT_BINARY_DIR})
50
51 # Build the test programs
52 add_executable(Test_Local_SH Test_Local_SH.cxx)
53 target_link_libraries(Test_Local_SH Batch)
54
55 add_executable(Test_Local_RSH Test_Local_RSH.cxx)
56 target_link_libraries(Test_Local_RSH Batch)
57
58 add_executable(Test_Local_SSH Test_Local_SSH.cxx)
59 target_link_libraries(Test_Local_SSH Batch)
60
61 # Add the tests themselves
62 ADD_TEST(Local_SH Test_Local_SH)
63 ADD_TEST(Local_RSH Test_Local_RSH)
64 ADD_TEST(Local_SSH Test_Local_SSH)