]> SALOME platform Git repositories - tools/libbatch.git/blob - src/Local/Test/CMakeLists.txt
Salome HOME
cc95e45865ecad610994d1abe733181b944c17b9
[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_RSH_EXECUTION_HOST "localhost" CACHE STRING
25      "Execution host for RSH Batch test (only necessary for test target)")
26 SET (TEST_LOCAL_RSH_WORK_DIR "/tmp" CACHE STRING
27      "Work directory for RSH Batch test (only necessary for test target)")
28
29 SET (TEST_LOCAL_SSH_EXECUTION_HOST "localhost" CACHE STRING
30      "Execution host for SSH Batch test (only necessary for test target)")
31 SET (TEST_LOCAL_SSH_WORK_DIR "/tmp" CACHE STRING
32      "Work directory for SSH Batch test (only necessary for test target)")
33
34 # Configure the config file for all the test scripts
35 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Test_Local_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Test_Local_config.h)
36
37 # Just copy the test scripts to the binary dir
38 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/seta.sh ${CMAKE_CURRENT_BINARY_DIR}/seta.sh COPYONLY)
39 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/setb.sh ${CMAKE_CURRENT_BINARY_DIR}/setb.sh COPYONLY)
40 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test-script.sh ${CMAKE_CURRENT_BINARY_DIR}/test-script.sh COPYONLY)
41
42 # set the include directories
43 include_directories(${CMAKE_SOURCE_DIR}/src/Core)
44 include_directories(${CMAKE_CURRENT_BINARY_DIR})
45
46 # Build the test programs
47 add_executable(Test_Local_SH Test_Local_SH.cxx)
48 target_link_libraries(Test_Local_SH Batch)
49
50 add_executable(Test_Local_RSH Test_Local_RSH.cxx)
51 target_link_libraries(Test_Local_RSH Batch)
52
53 add_executable(Test_Local_SSH Test_Local_SSH.cxx)
54 target_link_libraries(Test_Local_SSH Batch)
55
56 # Add the tests themselves
57 ADD_TEST(Local_SH Test_Local_SH)
58 ADD_TEST(Local_RSH Test_Local_RSH)
59 ADD_TEST(Local_SSH Test_Local_SSH)