From: rnv Date: Fri, 15 May 2020 10:40:15 +0000 (+0300) Subject: Fix for "#19007 [CEA][Windows] SALOME non regression tests on Windows" issue. X-Git-Tag: V9_5_0b1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=831895829b9dc43adc8963116fd0707de4a565d8;p=modules%2Fkernel.git Fix for "#19007 [CEA][Windows] SALOME non regression tests on Windows" issue. --- diff --git a/bin/appliskel/tests/concurrentSession/CTestTestfileInstall.cmake b/bin/appliskel/tests/concurrentSession/CTestTestfileInstall.cmake index 00be7d656..5b333d6e6 100644 --- a/bin/appliskel/tests/concurrentSession/CTestTestfileInstall.cmake +++ b/bin/appliskel/tests/concurrentSession/CTestTestfileInstall.cmake @@ -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() diff --git a/bin/appliskel/tests/salomeCommand/CTestTestfileInstall.cmake b/bin/appliskel/tests/salomeCommand/CTestTestfileInstall.cmake index cd3f3b385..f10146881 100644 --- a/bin/appliskel/tests/salomeCommand/CTestTestfileInstall.cmake +++ b/bin/appliskel/tests/salomeCommand/CTestTestfileInstall.cmake @@ -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() diff --git a/bin/appliskel/tests/salomeCommand/TestLauncherSessionArgs.py b/bin/appliskel/tests/salomeCommand/TestLauncherSessionArgs.py index 22dd8be24..536994dce 100755 --- a/bin/appliskel/tests/salomeCommand/TestLauncherSessionArgs.py +++ b/bin/appliskel/tests/salomeCommand/TestLauncherSessionArgs.py @@ -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() diff --git a/bin/appliskel/tests/salomeInstance/CTestTestfileInstall.cmake b/bin/appliskel/tests/salomeInstance/CTestTestfileInstall.cmake index caa731da7..4e2f61a2d 100644 --- a/bin/appliskel/tests/salomeInstance/CTestTestfileInstall.cmake +++ b/bin/appliskel/tests/salomeInstance/CTestTestfileInstall.cmake @@ -19,8 +19,12 @@ 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()