]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
[CEA 41787][Windows] RESTRICTED tests are not run bos/41979 64/head
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 21 May 2024 09:46:43 +0000 (11:46 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 21 May 2024 09:46:43 +0000 (11:46 +0200)
test.hdfs/CTestTestfileInstall.cmake
test.hdfs/testme.py

index d77bbeeae20e49af572e13162875547f3f405089..4d57500356c9d9029f45c2b24357db2ec8dd6eb3 100644 (file)
 INCLUDE(tests.set)
 
 SET(COMPONENT_NAME     SHAPER)
-SET(PYTHON_TEST_DRIVER "testme.py")
+
+SET(PYTHON_TEST_DRIVER "$ENV{SHAPER_ROOT_DIR}/bin/salome/test/HDFs/testme.py")
+IF (WIN32)
+  FILE(TO_CMAKE_PATH ${PYTHON_TEST_DRIVER} PYTHON_TEST_DRIVER)
+ENDIF(WIN32)
 SET(TIMEOUT            600)
 
 FOREACH(tfile ${PUBLIC_TESTS})
   SET(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
-  ADD_TEST(${TEST_NAME} ${PYTHON_TEST_DRIVER} "${TIMEOUT}" "${tfile}.hdf" "${tfile}.py")
+  ADD_TEST(${TEST_NAME} python ${PYTHON_TEST_DRIVER} "${TIMEOUT}" "${tfile}.hdf" "${tfile}.py")
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
 
 FOREACH(tfile ${RESTRICTED_TESTS})
   SET(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
-  ADD_TEST(${TEST_NAME} ${PYTHON_TEST_DRIVER} "${TIMEOUT}" "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf" "${tfile}.py")
+  ADD_TEST(${TEST_NAME} python ${PYTHON_TEST_DRIVER} "${TIMEOUT}" "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf" "${tfile}.py")
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 01f8c1f7c1a7d14afe1314439d62a82218ae83de..187afebb46c19e04d66f85f981880739da479a93 100644 (file)
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-
 if __name__ == '__main__':
 
   import subprocess
   from time import sleep
   import sys, os
   import tempfile
+  import platform
 
   testTimeout = 600
   if len(sys.argv) > 3:
@@ -48,8 +48,11 @@ if __name__ == '__main__':
 
   isOk = True
   error = ""
-
-  proc = subprocess.Popen(["runSalome.py", "--modules", "SHAPER,GEOM,SHAPERSTUDY", "--gui", "--splash", "0", test_hdfpy, "args:" + hdffile + "," + testdatafile + "," + testlogfile])
+  runSalome = os.path.join(os.getenv("KERNEL_ROOT_DIR"), "bin", "salome", "runSalome.py")
+  cmd= [runSalome , "--modules", "SHAPER,GEOM,SHAPERSTUDY", "--gui", "--splash", "0", test_hdfpy, "args:" + hdffile + "," + testdatafile + "," + testlogfile]
+  if platform.system() == "Windows" :
+    cmd = ["python3", *cmd]
+  proc = subprocess.Popen(cmd)
   try:
     proc.communicate(timeout = testTimeout)
   except subprocess.TimeoutExpired: