]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix salome test when both py2 & py3 are available.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Thu, 2 Apr 2020 13:20:47 +0000 (15:20 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Thu, 2 Apr 2020 13:20:47 +0000 (15:20 +0200)
26 files changed:
bin/appliskel/tests/concurrentSession/CMakeLists.txt
bin/appliskel/tests/concurrentSession/CTestTestfileInstall.cmake
bin/appliskel/tests/salomeCommand/CMakeLists.txt
bin/appliskel/tests/salomeCommand/CTestTestfileInstall.cmake
bin/appliskel/tests/salomeInstance/CMakeLists.txt
bin/appliskel/tests/salomeInstance/CTestTestfileInstall.cmake
bin/appliskel/tests/salomeTest/CMakeLists.txt
bin/appliskel/tests/salomeTest/salome_test_in_shell.sh
src/KernelHelpers/Test/CTestTestfileInstall.cmake
src/Launcher/Test/CTestTestfileInstall.cmake
src/Launcher/Test/test_stress.sh
src/Launcher_SWIG/Test/CMakeLists.txt
src/Launcher_SWIG/Test/CTestTestfileInstall.cmake
src/LifeCycleCORBA/Test/CTestTestfileInstall.cmake
src/LifeCycleCORBA_SWIG/Test/CTestTestfileInstall.cmake
src/NamingService/Test/CTestTestfileInstall.cmake
src/SALOMEDSImpl/Test/CTestTestfileInstall.cmake
src/SALOMELocalTrace/Test/CTestTestfileInstall.cmake
src/SALOMESDS/CTestTestfileInstall.cmake
src/SALOMETraceCollector/Test/CMakeLists.txt
src/SALOMETraceCollector/Test/CTestTestfileInstall.cmake
src/SALOMETraceCollector/Test/TestSALOMETraceCollector.py
src/UnitTests/CMakeLists.txt
src/UnitTests/CTestTestfileInstall.cmake
src/UnitTests/UnitTests.py
src/Utils/Test/CTestTestfileInstall.cmake

index e1384c30f89209641dd08cfecca947bbf9e17df3..a6193370b3e93cc27686545ec2171d631d7cbe63 100644 (file)
@@ -27,5 +27,5 @@ INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${KERNEL_TEST_DIR}/concurrentSession
         RENAME CTestTestfile.cmake)
 
-INSTALL(FILES ${scripts}
+INSTALL(PROGRAMS ${scripts}
         DESTINATION ${KERNEL_TEST_DIR}/concurrentSession)
index dbf137c9a3470cbfd9e5ad2a86e8394203f34255..f444b288c61565a9355122db8ebdcd820db7a45a 100644 (file)
@@ -24,6 +24,6 @@ SET(TEST_NAMES
 
 FOREACH(tfile ${TEST_NAMES})
   SET(TEST_NAME ${COMPONENT_NAME}_SALOME_CONCURRENT_${tfile})
-  ADD_TEST(${TEST_NAME} python ${tfile}.py)
+  ADD_TEST(${TEST_NAME} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index 86d681dda1a4593133e36856cfaabe4da63c8fef..8a7a13b927d6eb796b7f8abeb781c1065950c7d2 100644 (file)
@@ -24,5 +24,5 @@ INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${KERNEL_TEST_DIR}/salomeCommand
         RENAME CTestTestfile.cmake)
 
-INSTALL(FILES ${scripts}
+INSTALL(PROGRAMS ${scripts}
         DESTINATION ${KERNEL_TEST_DIR}/salomeCommand)
index 1521b7cec60055b2a809ee992ff452866c77493e..05ab4d56ce91ad707018b71c904cea29eb94d4f1 100644 (file)
@@ -24,6 +24,6 @@ SET(TEST_NAMES
 
 FOREACH(tfile ${TEST_NAMES})
   SET(TEST_NAME ${COMPONENT_NAME}_SALOME_COMMAND_${tfile})
-  ADD_TEST(${TEST_NAME} python ${tfile}.py)
+  ADD_TEST(${TEST_NAME} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index 49266a318d45d80ba9ddbb2daaa05059d6d3e29b..44ccf86d34b147696fc3fdd47b564c15786252e6 100644 (file)
@@ -26,5 +26,5 @@ INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${KERNEL_TEST_DIR}/salomeInstance
         RENAME CTestTestfile.cmake)
 
-INSTALL(FILES ${scripts}
+INSTALL(PROGRAMS ${scripts}
         DESTINATION ${KERNEL_TEST_DIR}/salomeInstance)
index bc227ddb45c398f97f6bf14b16f3afdb4bcfeb31..3f217c536084d97e2a8e8db6a4c26a0476bbd837 100644 (file)
@@ -21,6 +21,6 @@ SET(TEST_NAMES instances)
 
 FOREACH(tfile ${TEST_NAMES})
   SET(TEST_NAME ${COMPONENT_NAME}_SALOME_INSTANCE_${tfile})
-  ADD_TEST(${TEST_NAME} python ${tfile}.py)
+  ADD_TEST(${TEST_NAME} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index f0b512402f8064b16b0a61dba3477f48ee943b45..c8d1ac59ea58460cbd1eed20ba1a47ce45857b7b 100644 (file)
@@ -27,5 +27,5 @@ INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${KERNEL_TEST_DIR}/salomeTest
         RENAME CTestTestfile.cmake)
 
-INSTALL(FILES ${scripts}
+INSTALL(PROGRAMS ${scripts}
         DESTINATION ${KERNEL_TEST_DIR}/salomeTest)
index debc3f436af0af360eac9033de0ea85b16d9f104..b6a412c245782313e750969adb8e297d4e479e47 100755 (executable)
@@ -25,4 +25,4 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
 CALLDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 
 echo ABSOLUTE_APPLI_PATH: $ABSOLUTE_APPLI_PATH
-$ABSOLUTE_APPLI_PATH/salome shell -- python ${CALLDIR}/salome_test.py
+$ABSOLUTE_APPLI_PATH/salome shell -- python3 ${CALLDIR}/salome_test.py
index 1c0e7a511106cff7249870f14b169924bc8bba9e..3545d704f88a6f78fed523c009c3abc38db0d827 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_KernelHelpers)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestKernelHelpers.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestKernelHelpers.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
index eb64b2836307cb865a4c7f0661b045cdb49c147b..5e6f9546eddc599fecfc1f85f88f47d116af39c8 100644 (file)
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_Launcher)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} 2000 test_launcher.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} 2000 test_launcher.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
     #                                                 TIMEOUT 500
     )
 
   SET(TEST_NAME ${COMPONENT_NAME}_StressLauncher)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} 2000 ./test_stress.sh)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} 2000 ./test_stress.sh)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
     #                                                 TIMEOUT 500
     )
index 0bb53bc683811b83708abb9682c147cc185eb964..2853ff5d4bf48e1ae2a79b1895e4e78ec9ce6402 100755 (executable)
@@ -25,7 +25,7 @@ chmod 755 $WORKDIR/command.sh
 pid_launcher=''
 for i in {1..500}
 do
-  python launcher_use_case.py $WORKDIR 2> $WORKDIR/log$i.err &
+  ./launcher_use_case.py $WORKDIR 2> $WORKDIR/log$i.err &
   pid_launcher=$pid_launcher" "$!
 done
 exit_code=0
index 3739e412ab53ee61bd838956bd73e35c61b4a308..b4b8121995a74597d467d31b8889bae2e32daf9c 100644 (file)
@@ -27,7 +27,7 @@ IF(NOT WIN32)
 #           ${CMAKE_CURRENT_SOURCE_DIR}/test_launcher.py
 #           -d KERNEL_ROOT_DIR=${CMAKE_INSTALL_PREFIX}
 #          )
-  INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test_swig_launcher.py
+  INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/test_swig_launcher.py
           DESTINATION ${KERNEL_TEST_DIR}/Launcher_SWIG)
 
   INSTALL(FILES CTestTestfileInstall.cmake
index b4b2d182149785832054a2c40d5d312d7ee5e596..53a047e48472c8a9fc34260faaf4a76d7a577343 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_Launcher_SWIG)
-  ADD_TEST(${TEST_NAME} python test_swig_launcher.py)
+  ADD_TEST(${TEST_NAME} test_swig_launcher.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
     #                                                 TIMEOUT 500
     )
index 3c3f833841e5c59199ddafe83b97b7de3c51bd1f..67a718d4da35fc8d50d9ea8ebe0f56202b821f5c 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_LifeCycleCORBA)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestLifeCycleCORBA.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestLifeCycleCORBA.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
index 6e9731097d0ee197d62096f5787008cae1169d6e..7e2aee3c4ed9e39ccb2ba1c8ab9bf6fb3df17704 100644 (file)
@@ -26,14 +26,14 @@ SET(TEST_NAMES
 IF(NOT WIN32)
   FOREACH(tfile ${TEST_NAMES})
     SET(TEST_NAME ${COMPONENT_NAME}_LC_${tfile})
-    ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
+    ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
     SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
       )
   ENDFOREACH()
 
   # resource manager test needs specific CatalogResources file in test directory
   SET(TEST_NAME ${COMPONENT_NAME}_LC_testresourcemanager)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} testresourcemanager.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} testresourcemanager.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "USER_CATALOG_RESOURCES_FILE=CatalogResources_resource.xml"
                       )
index 9496f4b67d8526b4efe3d44f7da3a8283780a907..7a0d306f980e441812cb3999732c99c6d5053363 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_NamingService)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestNamingService.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestNamingService.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
index 5c1581a8a66181d2b22da21005390a54861095a9..01b0d231b03e8d9f8a0f5cec9caf8099b44f2834 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_SALOMEDSImpl)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDSImpl.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMEDSImpl.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
index 9e6a8656204e1b7f4a1eed836b1c3d126e021250..ddee7544fc7ea8bc255fccb8994cef0dc626ccf4 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_LocalTrace)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMELocalTrace.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMELocalTrace.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
index ea15d9426955cf40aef2d38bc8184e5351aa8813..c83c58485439f83d886fd0569b1317d3494dd57b 100644 (file)
@@ -19,6 +19,6 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_SalomeSDS)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSalomeSDS.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSalomeSDS.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" ENVIRONMENT "PYTHONPATH=${KERNEL_TEST_LIB}:$ENV{PYTHONPATH}")
 ENDIF(NOT WIN32)
index 5820995616b629ceca5d236e6c5923f898a88cc6..fff7edeb63fca6d501440ef4403aa3b9de44ce20 100644 (file)
@@ -48,11 +48,11 @@ TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON
 INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${LOCAL_TEST_DIR})
 
 # Executable scripts to be installed
-INSTALL(FILES TestSALOMETraceCollector.py DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(PROGRAMS TestSALOMETraceCollector.py DESTINATION ${LOCAL_TEST_DIR})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 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
+        RENAME CTestTestfile.cmake)
index 4a67db93baf47c3822a8655080551bfd50ccf1d3..9ea5e01eeafb3ad7fdfae49ffd5007f14895db25 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_SALOMETraceCollector)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMETraceCollector.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestSALOMETraceCollector.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
index 8bc9cce04304d215f4d4f511e48a0f1cc29bcd39..69cfe469abf3dcc1c291cd09ed62f5f03250503a 100644 (file)
@@ -1,3 +1,4 @@
+#! /usr/bin/env python3
 #  -*- coding: iso-8859-1 -*-
 # Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 #
index f3cd141f6bdac3297ade2fa50247cf2efb319e53..c4fa5c98debd0c59e31eebcd0c62e1536a477bc5 100644 (file)
@@ -33,7 +33,7 @@ INCLUDE_DIRECTORIES(
 
 # Executable scripts to be installed
 SET(LOCAL_TEST_DIR ${KERNEL_TEST_DIR}/UnitTests)
-INSTALL(FILES UnitTests.py DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(PROGRAMS UnitTests.py DESTINATION ${LOCAL_TEST_DIR})
 
 # ===============================================================
 # Executables targets
@@ -98,4 +98,4 @@ INSTALL(TARGETS UnitTests DESTINATION ${LOCAL_TEST_DIR})
 
 INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${LOCAL_TEST_DIR}
-        RENAME CTestTestfile.cmake)
\ No newline at end of file
+        RENAME CTestTestfile.cmake)
index ff77f2d80e64ce1c9e2615239d9b2fb49f69e9e7..823ecf259d6105bf1db9651b094b8d593325b914 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_UnitTests)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} UnitTests.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} UnitTests.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
index 58c2ae01c0e6116d02e8d861a56e4d2a7281cd28..57bc87cf526b0f97d50c38f2d5411dc562e2e7c1 100644 (file)
@@ -1,3 +1,4 @@
+#! /usr/bin/env python3
 #  -*- coding: iso-8859-1 -*-
 # Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 #
index bb065cb20be07cd4a41bb09a7faceeee48e93c10..36c676d472d32998954413cb383bb99fe40c5bc1 100644 (file)
@@ -19,7 +19,7 @@
 
 IF(NOT WIN32)
   SET(TEST_NAME ${COMPONENT_NAME}_Utils)
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestUtils.py)
+  ADD_TEST(${TEST_NAME} ${SALOME_TEST_DRIVER} ${TIMEOUT} TestUtils.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
                                     LABELS "${COMPONENT_NAME}"
                                     ENVIRONMENT "LD_LIBRARY_PATH=${KERNEL_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"