# 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
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
--- /dev/null
+# 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
+ )
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)
--- /dev/null
+# 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()
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
# 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)
# -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()
# 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}"
)
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)
--- /dev/null
+# 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()
# execute Unit Test
-command = ['TestLifeCycleCORBA']
+command = ['./TestLifeCycleCORBA']
ret = os.spawnvp(os.P_WAIT, command[0], command)
# kill containers created by the Container Manager
addToKillList.killList()
TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
--- /dev/null
+# 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()
addToKillList.killList()
TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
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):
)
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
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)
--- /dev/null
+# 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()
# 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)
# kill Test process
TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
)
ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS})
+SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/SALOMEDS)
IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
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
--- /dev/null
+# 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()
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
# 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
)
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
--- /dev/null
+# 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()
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
# 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
)
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
--- /dev/null
+# 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()
# 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
)
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
--- /dev/null
+# 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()
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
# 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
# ===============================================================
# 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
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
--- /dev/null
+# 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()
# execute Unit Test
-command = ['UnitTests']
+command = ['./UnitTests']
ret = os.spawnvp(os.P_WAIT, command[0], command)
# kill containers created by the Container Manager
# kill Test process
TestKiller.killProcess(runSalome.process_id)
+exit(ret)
\ No newline at end of file
)
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
--- /dev/null
+# 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()
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
# 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