]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix for "#19007 [CEA][Windows] SALOME non regression tests on Windows" issue. V9_5_0b1
authorrnv <rnv@opencascade.com>
Fri, 15 May 2020 10:40:15 +0000 (13:40 +0300)
committerrnv <rnv@opencascade.com>
Fri, 15 May 2020 10:40:15 +0000 (13:40 +0300)
bin/appliskel/tests/concurrentSession/CTestTestfileInstall.cmake
bin/appliskel/tests/salomeCommand/CTestTestfileInstall.cmake
bin/appliskel/tests/salomeCommand/TestLauncherSessionArgs.py
bin/appliskel/tests/salomeInstance/CTestTestfileInstall.cmake

index 00be7d656b886e83516b2d65eb2adfcea76264f0..5b333d6e68fcfe0fe3f5b55acba74a7724976432 100644 (file)
@@ -22,8 +22,12 @@ SET(TEST_NAMES
   TestConcurrentSession
   )
 
+IF (WIN32)
+  SET(PY_EXEC $ENV{PYTHONBIN})
+ENDIF()
+
 FOREACH(tfile ${TEST_NAMES})
   SET(TEST_NAME ${COMPONENT_NAME}_SALOME_CONCURRENT_${tfile})
-  ADD_TEST(${TEST_NAME} ${tfile}.py)
+  ADD_TEST(${TEST_NAME} ${PY_EXEC} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index cd3f3b385586b6628f13aa7fc5719d2ed52dc32e..f101468812b006f632dd9425d83565d282fc25c0 100644 (file)
@@ -22,8 +22,12 @@ SET(TEST_NAMES
   TestLauncherSessionArgs
   )
 
+IF(WIN32)
+  SET(PY_EXEC $ENV{PYTHONBIN})
+ENDIF()
+
 FOREACH(tfile ${TEST_NAMES})
   SET(TEST_NAME ${COMPONENT_NAME}_SALOME_COMMAND_${tfile})
-  ADD_TEST(${TEST_NAME} ${tfile}.py)
+  ADD_TEST(${TEST_NAME} ${PY_EXEC} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index 22dd8be24e1c35805076f44c1edc8d47ccf73680..536994dce8a320d130cd77c3734dc7c5edc7eaef 100755 (executable)
@@ -58,6 +58,8 @@ class TestSessionArgs(unittest.TestCase):
   def setUp(self):
     import tempfile
     self.logFile = tempfile.NamedTemporaryFile()
+    if sys.platform == "win32": # Close file because of permission denined on Windows
+        self.logFile.close()
   #
   def tearDown(self):
     self.logFile.close()
index caa731da75fad2dd0ca66112db2d94a723647784..4e2f61a2d2dfe2442a53d29d9eae2d76b0825aec 100644 (file)
 
 SET(TEST_NAMES instances)
 
+IF (WIN32)
+  SET(PY_EXEC $ENV{PYTHONBIN})
+ENDIF()
+
 FOREACH(tfile ${TEST_NAMES})
   SET(TEST_NAME ${COMPONENT_NAME}_SALOME_INSTANCE_${tfile})
-  ADD_TEST(${TEST_NAME} ${tfile}.py)
+  ADD_TEST(${TEST_NAME} ${PY_EXEC} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()