PythonScriptTestDriver.cmake
Go to the documentation of this file.
1 # On windows, execute_process runs PARAVIEW_EXECUTABLE in background.
2 # We prepend "cmd /c" to force paraview's window to be shown to ensure proper
3 # mouse interactions with the GUI.
4 if(WIN32)
5  set(PARAVIEW_EXECUTABLE cmd /c ${PARAVIEW_EXECUTABLE})
6 endif()
7 
8 # set `DASHBOARD_TEST_FROM_CTEST` environment variable to ensure
9 # the executables realize we're running tests.
10 set(ENV{DASHBOARD_TEST_FROM_CTEST} "1")
11 
12 message(
13  "${PARAVIEW_EXECUTABLE} -dr --test-directory=${TEMPORARY_DIR} --data-directory=${DATA_DIR} --test-script=${TEST_SCRIPT} --exit"
14 )
15 
16 execute_process(
17  COMMAND ${PARAVIEW_EXECUTABLE} -dr
18  --test-directory=${TEMPORARY_DIR}
19  --data-directory=${DATA_DIR}
20  --test-script=${TEST_SCRIPT}
21  --exit
22  RESULT_VARIABLE rv
23 )
24 if (NOT rv EQUAL 0)
25  message(FATAL_ERROR "ParaView return value was ${rv}")
26 endif()
27 
28 message(
29  "${PVPYTHON_EXECUTABLE} -dr ${TEST_VERIFIER} -T ${TEMPORARY_DIR} -N ${TEST_NAME}"
30 )
31 
32 execute_process(
33  COMMAND ${PVPYTHON_EXECUTABLE} -dr
34  ${TEST_VERIFIER}
35  -T ${TEMPORARY_DIR}
36  -N ${TEST_NAME}
37  RESULT_VARIABLE rv
38 )
39 if (NOT rv EQUAL 0)
40  message(FATAL_ERROR "pvpython return value was ${rv}")
41 endif()
data
value