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()
#
# 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:
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: