Salome HOME
CppUnit tests updated to the new test procedure based on salome_test_driver.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Wed, 11 Mar 2015 14:20:35 +0000 (15:20 +0100)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 27 Mar 2015 11:01:46 +0000 (12:01 +0100)
35 files changed:
bin/appliskel/salome_tester/salome_test_driver.py
src/CMakeLists.txt
src/CTestTestfileInstall.cmake.in [new file with mode: 0644]
src/KernelHelpers/Test/CMakeLists.txt
src/KernelHelpers/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/KernelHelpers/Test/TestKernelHelpers.py
src/Launcher/Test/CMakeLists.txt
src/Launcher/Test/CTestTestfileInstall.cmake
src/LifeCycleCORBA/Test/CMakeLists.txt
src/LifeCycleCORBA/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/LifeCycleCORBA/Test/TestLifeCycleCORBA.py
src/LifeCycleCORBA_SWIG/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/LifeCycleCORBA_SWIG/Test/TestLifeCycleCORBA_SWIG.py
src/Logger/Test/TestKiller.py
src/NamingService/Test/CMakeLists.txt
src/NamingService/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/NamingService/Test/TestNamingService.py
src/SALOMEDS/Test/CMakeLists.txt
src/SALOMEDS/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/SALOMEDS/Test/TestSALOMEDS.py
src/SALOMEDSImpl/Test/CMakeLists.txt
src/SALOMEDSImpl/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py
src/SALOMELocalTrace/Test/CMakeLists.txt
src/SALOMELocalTrace/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/SALOMELocalTrace/Test/TestSALOMELocalTrace.py
src/SALOMETraceCollector/Test/CMakeLists.txt
src/SALOMETraceCollector/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/SALOMETraceCollector/Test/TestSALOMETraceCollector.py
src/UnitTests/CMakeLists.txt
src/UnitTests/CTestTestfileInstall.cmake [new file with mode: 0644]
src/UnitTests/UnitTests.py
src/Utils/Test/CMakeLists.txt
src/Utils/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
src/Utils/Test/TestUtils.py

index b7367366367105a6a3781de56591faf8c119018f..2587881ce5174c54a5b72023efba6532c328c1b8 100644 (file)
@@ -61,7 +61,8 @@ if __name__ == "__main__":
   # Add explicit call to python executable if a Python script is passed as
   # first argument
   if not args:
-    exit(0)
+    print "Invalid arguments for salome_test_helper.py. No command defined."
+    exit(1)
   _, ext = os.path.splitext(args[0])
   if ext == ".py":
     test_and_args = [sys.executable] + args
index 76ee1e6180ff4fca0ac0ae33dc6ec3ff729dec85..0303f3840be8873f3c367e4ad55d6fa647ce253a 100755 (executable)
@@ -99,6 +99,14 @@ ELSE()
   ENDIF()
 ENDIF()
 
+# For salome test
+SET(KERNEL_TEST_DIR ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
+SET(KERNEL_TEST_LIB ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/lib)
+CONFIGURE_FILE(CTestTestfileInstall.cmake.in CTestTestfileInstall.cmake @ONLY)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfileInstall.cmake
+        DESTINATION ${KERNEL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
+
 FOREACH(_dir ${SUBDIRS})
   ADD_SUBDIRECTORY(${_dir})
-ENDFOREACH()
+ENDFOREACH()
\ No newline at end of file
diff --git a/src/CTestTestfileInstall.cmake.in b/src/CTestTestfileInstall.cmake.in
new file mode 100644 (file)
index 0000000..97f990c
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
+SET(SALOME_TEST_DRIVER "@CMAKE_INSTALL_PREFIX@/bin/salome/appliskel/salome_test_driver.py")
+
+SET(COMPONENT_NAME KERNEL)
+SET(TIMEOUT        500)
+
+SET(KERNEL_TEST_LIB "@CMAKE_INSTALL_PREFIX@/@KERNEL_TEST_LIB@")
+
+# Add all test subdirs
+SUBDIRS( Launcher
+         LifeCycleCORBA_SWIG
+         NamingService
+         SALOMELocalTrace
+         LifeCycleCORBA
+         Logger
+         SALOMETraceCollector
+         KernelHelpers
+         SALOMEDS
+         SALOMEDSImpl
+         Utils
+         UnitTests
+    )
index 3784df24f6de62072ed72f698949036f91365503..3c228fef0f038c8423327dd4be64b10a4860291f 100755 (executable)
@@ -52,17 +52,23 @@ SET(SalomeKernelHelpersTest_LIBS
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
 
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/KernelHelpers)
+
 ADD_LIBRARY(SalomeKernelHelpersTest KernelHelpersUnitTests.cxx)
 TARGET_LINK_LIBRARIES(SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
-INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${KERNEL_TEST_LIB})
 
 ADD_EXECUTABLE(TestKernelHelpers TestKernelHelpers.cxx)
 TARGET_LINK_LIBRARIES(TestKernelHelpers SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
 #ADD_TEST(TestKernelHelpers TestKernelHelpers)
-INSTALL(TARGETS TestKernelHelpers DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestKernelHelpers DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestKernelHelpers.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestKernelHelpers.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
diff --git a/src/KernelHelpers/Test/CTestTestfileInstall.cmake b/src/KernelHelpers/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..73508ea
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(KernelHelpers python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestKernelHelpers.py)
+  SET_TESTS_PROPERTIES(KernelHelpers PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+  #                                                 TIMEOUT 500
+                      )
+  # /!\ DO NOT SET TIMEOUT PROPERTY IF USING ${SALOME_TEST_DRIVER}
+  #     BUT PASS TIMEOUT VALUE TO THE DRIVER
+
+ENDIF()
index 42ead6088a79478a536b3ac75a15a08aeb98ea0c..e9fd1347a5b7fcbb80be54563eabadf03628f707 100644 (file)
@@ -25,11 +25,12 @@ import sys, os,signal,string,commands
 import runSalome
 import orbmodule
 import TestKiller
+import setenv
 
 # get SALOME environment :
 
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = setenv.get_config()
+setenv.set_env(args, modules_list, modules_root_dir)
 
 # launch CORBA naming server
 
@@ -43,9 +44,10 @@ clt.waitLogger("Logger")
 
 # execute Unit Test
 
-command = ['TestKernelHelpers']
+command = ['./TestKernelHelpers']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # kill Test process 
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
index d77c657bed7322490b310dbd89a294f583cae9f4..6cb719fce0ce5ea1a72e96e6f8b5e212e210fa2c 100644 (file)
@@ -28,9 +28,9 @@ IF(NOT WIN32)
 #           -d KERNEL_ROOT_DIR=${CMAKE_INSTALL_PREFIX}
 #          )
   INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test_launcher.py
-          DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
+          DESTINATION ${KERNEL_TEST_DIR}/Launcher)
 
   INSTALL(FILES CTestTestfileInstall.cmake
-          DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test
+          DESTINATION ${KERNEL_TEST_DIR}/Launcher
           RENAME CTestTestfile.cmake)
 ENDIF()
index d43734d8faeab9c0fad56950afa183f1b03ccad3..311467a5a6759c893a77c005fd6912d72bd868ff 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
-
-SET(COMPONENT_NAME KERNEL)
-SET(TIMEOUT        500)
-
 IF(NOT WIN32)
   ADD_TEST(SalomeLauncher python ${SALOME_TEST_DRIVER} ${TIMEOUT} test_launcher.py)
   SET_TESTS_PROPERTIES(SalomeLauncher PROPERTIES LABELS "${COMPONENT_NAME}"
index 9402c1b176d27f27a38b819c57cda3a642b88888..9b1aa2c2ced8451735c14663b42597dcbaeaea66 100755 (executable)
@@ -56,17 +56,22 @@ SET(COMMON_LIBS
 )
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/LifeCycleCORBA)
 
 ADD_LIBRARY(LifeCycleCORBATest LifeCycleCORBATest.cxx)
 TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${COMMON_LIBS})
-INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${KERNEL_TEST_LIB})
 
 ADD_EXECUTABLE(TestLifeCycleCORBA TestLifeCycleCORBA.cxx)
 TARGET_LINK_LIBRARIES(TestLifeCycleCORBA LifeCycleCORBATest NamingServiceTest SalomeLifeCycleCORBA ${COMMON_LIBS})
-INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestLifeCycleCORBA.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestLifeCycleCORBA.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
diff --git a/src/LifeCycleCORBA/Test/CTestTestfileInstall.cmake b/src/LifeCycleCORBA/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..0b92f23
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(LifeCycleCORBA python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestLifeCycleCORBA.py)
+  SET_TESTS_PROPERTIES(LifeCycleCORBA PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+ENDIF()
index b4b73981050a4297bcde19cd16ad668e39059926..1d6984f20dc6f48a8b44644b196a1d069cc38fae 100644 (file)
@@ -72,7 +72,7 @@ clt.waitNS("/SalomeLauncher")
 
 # execute Unit Test
 
-command = ['TestLifeCycleCORBA']
+command = ['./TestLifeCycleCORBA']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # kill containers created by the Container Manager
@@ -86,3 +86,4 @@ launcher.Shutdown()
 addToKillList.killList()
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
diff --git a/src/LifeCycleCORBA_SWIG/Test/CTestTestfileInstall.cmake b/src/LifeCycleCORBA_SWIG/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..311467a
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(SalomeLauncher python ${SALOME_TEST_DRIVER} ${TIMEOUT} test_launcher.py)
+  SET_TESTS_PROPERTIES(SalomeLauncher PROPERTIES LABELS "${COMPONENT_NAME}"
+    #                                                 TIMEOUT 500
+    )
+  # /!\ DO NOT SET TIMEOUT PROPERTY IF USING ${SALOME_TEST_DRIVER}
+  #     BUT PASS TIMEOUT VALUE TO THE DRIVER
+
+ENDIF()
index 00ba9478c726819a2096e9f0e413c56e6929537d..0e0fc1955ac9ef82e57045fcb79d30d4cfba00ea 100644 (file)
@@ -95,3 +95,4 @@ launcher.Shutdown()
 addToKillList.killList()
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
index df88ded00e5ae09a254dd0a22b7296a569472d78..780fe6e7ecfacacfaba435812e82eec07f9e1297 100644 (file)
@@ -35,9 +35,13 @@ def killNamingService():
     line=f.readline()
     f.close()
     port=string.split(line,':')[-1][0:4]
-    command='ps -eo pid,command | grep "omniNames -start '+str(port)+'"'
-    pid=string.split(commands.getoutput(command))[0]
-    os.kill(int(pid),signal.SIGKILL)
+    command='ps -eo pid,command | grep "omniNames -start '+str(port)+'" | grep --invert-match grep'
+    output_com = commands.getoutput(command)
+    try:
+      pid=string.split(output_com)[0]
+      os.kill(int(pid),signal.SIGKILL)
+    except:
+      print "killNamingService failed."
 
 
 def killProcess(process_id):
index d539bedbeac436e30daf00916f79ccbcf0de9c49..8f134521b287aa648e1d72c17800f6e83cddba30 100755 (executable)
@@ -44,10 +44,11 @@ SET(COMMON_LIBS
 )
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/NamingService)
 
 ADD_LIBRARY(NamingServiceTest NamingServiceTest.cxx)
 TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS})
-INSTALL(TARGETS NamingServiceTest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS NamingServiceTest DESTINATION ${KERNEL_TEST_LIB})
 
 SET(TestNamingService_LIBS
   NamingServiceTest
@@ -64,10 +65,14 @@ SET(TestNamingService_LIBS
 
 ADD_EXECUTABLE(TestNamingService TestNamingService.cxx)
 TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS})
-INSTALL(TARGETS TestNamingService DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestNamingService DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestNamingService.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestNamingService.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
diff --git a/src/NamingService/Test/CTestTestfileInstall.cmake b/src/NamingService/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..c13e7ea
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(NamingService python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestNamingService.py)
+  SET_TESTS_PROPERTIES(NamingService PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+
+ENDIF()
index 44a806750c1b70f69a03e4d5f3a08da2f716cf7a..fdeb07791dc779127d9b4bf16e09d60bb15a8bf7 100644 (file)
@@ -51,7 +51,7 @@ clt.waitLogger("Logger")
 
 # execute Unit Test
 
-command = ['TestNamingService']
+command = ['./TestNamingService']
 valgrind = ['valgrind','--leak-check=full']
 #command=valgrind+command #to check memory leaks
 ret = os.spawnvp(os.P_WAIT, command[0], command)
@@ -59,3 +59,4 @@ ret = os.spawnvp(os.P_WAIT, command[0], command)
 # kill Test process
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
index 48d05776e3cd7c8f7087f3f1c5e9790586da0089..e9e84cb3ae9fda48be946a1ae8a984110da60c43 100755 (executable)
@@ -66,6 +66,7 @@ SET(COMMON_LIBS
 )
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMEDS)
 
 IF(WIN32)
   ADD_DEFINITIONS(-DNOGDI)
@@ -73,14 +74,18 @@ ENDIF(WIN32)
 
 ADD_LIBRARY(SALOMEDSTest SALOMEDSTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMEDSTest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SALOMEDSTest DESTINATION ${KERNEL_TEST_LIB})
 
 ADD_EXECUTABLE(TestSALOMEDS TestSALOMEDS.cxx)
 TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS TestSALOMEDS DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestSALOMEDS DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMEDS.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestSALOMEDS.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/SALOMEDS/Test/CTestTestfileInstall.cmake b/src/SALOMEDS/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..19b4545
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(SALOMEDS python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDS.py)
+  SET_TESTS_PROPERTIES(SALOMEDS PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+ENDIF()
index 68d653c9142ad8092381f4e4dea235c6e585b79d..90335a7067ce8732f0a72e826e0391176f13a945 100644 (file)
@@ -25,11 +25,12 @@ import sys, os,signal,string,commands
 import runSalome
 import orbmodule
 import TestKiller
+import setenv
 
 # get SALOME environment :
 
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = setenv.get_config()
+setenv.set_env(args, modules_list, modules_root_dir)
 
 # launch CORBA naming server
 
@@ -43,9 +44,10 @@ clt.waitLogger("Logger")
 
 # execute Unit Test
 
-command = ['TestSALOMEDS']
+command = ['./TestSALOMEDS']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # kill Test process 
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
index 22eb32d41b5042aa232d79d793c41d43b5f0388b..e5d83a0b0525c6c97a2a374c861ae7537b6c1551 100755 (executable)
@@ -60,17 +60,22 @@ SET(COMMON_LIBS
 )  
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMEDSImpl)
 
 ADD_LIBRARY(SALOMEDSImplTest SALOMEDSImplTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${KERNEL_TEST_LIB})
 
 ADD_EXECUTABLE(TestSALOMEDSImpl TestSALOMEDSImpl.cxx)
 TARGET_LINK_LIBRARIES(TestSALOMEDSImpl SALOMEDSImplTest SalomeDSImpl NamingServiceTest ${COMMON_LIBS})
-INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMEDSImpl.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestSALOMEDSImpl.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/SALOMEDSImpl/Test/CTestTestfileInstall.cmake b/src/SALOMEDSImpl/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..7751fda
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(SALOMEDSImpl python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDSImpl.py)
+  SET_TESTS_PROPERTIES(SALOMEDSImpl PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+ENDIF()
index f2a008e01aa2bced383b15e84edb6f8a41e68d0a..e1795ba89574aca9ff738acae70fa81d84049d4f 100644 (file)
@@ -25,11 +25,12 @@ import sys, os,signal,string,commands
 import runSalome
 import orbmodule
 import TestKiller
+import setenv
 
 # get SALOME environment :
 
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = setenv.get_config()
+setenv.set_env(args, modules_list, modules_root_dir)
 
 # launch CORBA naming server
 
@@ -43,9 +44,10 @@ clt.waitLogger("Logger")
 
 # execute Unit Test
 
-command = ['TestSALOMEDSImpl']
+command = ['./TestSALOMEDSImpl']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # kill Test process 
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
index 3d45463f2547677e7615175357bf7d5aaf29475d..2dd163638c1c37a3e9947a638d776a310081880d 100755 (executable)
@@ -26,17 +26,22 @@ INCLUDE_DIRECTORIES(
 )
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMELocalTrace)
 
 ADD_LIBRARY(SALOMELocalTraceTest SALOMELocalTraceTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBRARIES} ${PTHREAD_LIBRARIES} ${PLATFORM_LIBS})
-INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${KERNEL_TEST_LIB})
 
 ADD_EXECUTABLE(TestSALOMELocalTrace TestSALOMELocalTrace.cxx)
 TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
-INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMELocalTrace.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestSALOMELocalTrace.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/SALOMELocalTrace/Test/CTestTestfileInstall.cmake b/src/SALOMELocalTrace/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..0fcbfae
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(SALOMELocalTrace python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMELocalTrace.py)
+  SET_TESTS_PROPERTIES(SALOMELocalTrace PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+ENDIF()
index 1e7447baa023305e218987edb04b53d4b3512c3b..4eb8017b458e6f934554b22685f29d44859dfc0b 100644 (file)
@@ -33,7 +33,8 @@ setenv.set_env(args, modules_list, modules_root_dir)
 
 # execute Unit Test
 
-command = ['TestSALOMELocalTrace']
+command = ['./TestSALOMELocalTrace']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # no process to kill
+exit(ret)
\ No newline at end of file
index d0f13233891878a54c5bf58b2f4838b671396501..817231041372d13da05104964da9821166812b96 100755 (executable)
@@ -37,17 +37,22 @@ SET(COMMON_LIBS
 )
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMETraceCollector)
 
 ADD_LIBRARY(SALOMETraceCollectorTest SALOMETraceCollectorTest.cxx)
 TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${KERNEL_TEST_LIB})
 
 ADD_EXECUTABLE(TestSALOMETraceCollector TestSALOMETraceCollector.cxx)
 TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON_LIBS})
-INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMETraceCollector.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestSALOMETraceCollector.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/SALOMETraceCollector/Test/CTestTestfileInstall.cmake b/src/SALOMETraceCollector/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..08c3e29
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(SALOMETraceCollector python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMETraceCollector.py)
+  SET_TESTS_PROPERTIES(SALOMETraceCollector PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+ENDIF()
index 66ee7a4115427dd27a66d7e526763d596d3fe44a..f04cfb6dad6df87193ab4ab70e9f3204f65b58f2 100644 (file)
@@ -25,11 +25,12 @@ import sys, os,signal,string,commands
 import runSalome
 import orbmodule
 import TestKiller
+import setenv
 
 # get SALOME environment :
 
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = setenv.get_config()
+setenv.set_env(args, modules_list, modules_root_dir)
 
 # launch CORBA naming server
 
@@ -43,9 +44,10 @@ clt.waitLogger("Logger")
 
 # execute Unit Test
 
-command = ['TestSALOMETraceCollector']
+command = ['./TestSALOMETraceCollector']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # kill Test process 
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
index 493d03fa7a7cec52040cc3cb5fc41c28cb927074..6254defb47b0d85cd600de2d182aa00ce966f3e9 100755 (executable)
@@ -32,7 +32,8 @@ INCLUDE_DIRECTORIES(
 # ===============================================================
 
 # Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(UnitTests.py ${SALOME_INSTALL_SCRIPT_SCRIPTS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/UnitTests)
+INSTALL(FILES UnitTests.py DESTINATION ${LOCAL_TEST_DIR})
 
 # ===============================================================
 # Executables targets
@@ -93,4 +94,8 @@ ENDIF()
 
 ADD_EXECUTABLE(UnitTests UnitTests.cxx)
 TARGET_LINK_LIBRARIES(UnitTests ${COMMON_LIBS})
-INSTALL(TARGETS UnitTests DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS UnitTests DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/UnitTests/CTestTestfileInstall.cmake b/src/UnitTests/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..4aa37ee
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(UnitTests python ${SALOME_TEST_DRIVER} ${TIMEOUT} UnitTests.py)
+  SET_TESTS_PROPERTIES(UnitTests PROPERTIES
+                                     LABELS "${COMPONENT_NAME}"
+                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+
+ENDIF()
index abc0ceeebf6e1331073fc6139d26cac0937483a5..30bfdfc89a7c009c50edbf2ad4dbdc8832bdb756 100644 (file)
@@ -71,7 +71,7 @@ clt.waitNS("/SalomeLauncher")
 
 # execute Unit Test
 
-command = ['UnitTests']
+command = ['./UnitTests']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # kill containers created by the Container Manager
@@ -83,3 +83,4 @@ launcher.Shutdown()
 # kill Test process
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
index 6e1e761fe525d21800262759c8985686855da77d..df751f478bf8b5f4dc0a90b24093e78079fc4ed0 100755 (executable)
@@ -41,16 +41,21 @@ SET(COMMON_LIBS
 )
 
 ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/Utils)
 
 ADD_LIBRARY(UtilsTest UtilsTest.cxx)
 TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} )
-INSTALL(TARGETS UtilsTest DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS UtilsTest DESTINATION ${KERNEL_TEST_LIB})
 
 ADD_EXECUTABLE(TestUtils TestUtils.cxx)
 TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBRARIES})
-INSTALL(TARGETS TestUtils DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS TestUtils DESTINATION ${LOCAL_TEST_DIR})
 
-SALOME_INSTALL_SCRIPTS(TestUtils.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES TestUtils.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${LOCAL_TEST_DIR})
+
+INSTALL(FILES CTestTestfileInstall.cmake
+        DESTINATION ${LOCAL_TEST_DIR}
+        RENAME CTestTestfile.cmake)
\ No newline at end of file
diff --git a/src/Utils/Test/CTestTestfileInstall.cmake b/src/Utils/Test/CTestTestfileInstall.cmake
new file mode 100644 (file)
index 0000000..3a06d1f
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright (C) 2015  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+  ADD_TEST(Utils python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestUtils.py)
+  SET_TESTS_PROPERTIES(Utils PROPERTIES
+                             LABELS "${COMPONENT_NAME}"
+                             ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+                      )
+ENDIF()
index 46fe5ca168069a907521ecd0e28f1a4433b71d4d..3bc8f86c454a54a8e949d638396c7c9f3d7ab128 100644 (file)
@@ -25,11 +25,12 @@ import sys, os,signal,string,commands
 import runSalome
 import orbmodule
 import TestKiller
+import setenv
 
 # get SALOME environment :
 
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = setenv.get_config()
+setenv.set_env(args, modules_list, modules_root_dir)
 
 # launch CORBA naming server
 
@@ -43,9 +44,10 @@ clt.waitLogger("Logger")
 
 # execute Unit Test
 
-command = ['TestUtils']
+command = ['./TestUtils']
 ret = os.spawnvp(os.P_WAIT, command[0], command)
 
 # kill Test process
 
 TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file