Commit 2f5c051d authored by Ethan Stam's avatar Ethan Stam Committed by Kitware Robot
Browse files

Merge topic 'cinema-export-now-tests' into release

a2a9d71e Try pvbatch
553352cd Add mpiexec in hopes of fixing mpi leaks
be9f3417 Use pvpython to compare results and add time_source.pvsm to CMakeLists.txt
da60f939 Disable windows cdb export now tests
389e8ab2 Fix typo
11a3c775 Re-enable ExportGeometry and NoTimesteps for windows
2cd3e493 Try cmake's regex replace instead of commands
acd52253

 Fix windows tests and disable the image extract ones
...
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Sebastien Jourdain's avatarSebastien Jourdain <sebastien.jourdain@kitware.com>
Merge-request: !3440
parents eb5e5ccd a2a9d71e
......@@ -94,6 +94,7 @@ ExternalData_Expand_Arguments(ParaViewData _
"DATA{${paraview_test_data_directory_input}/Data/testxmlpartds.vtpd}"
"DATA{${paraview_test_data_directory_input}/Data/testxmlpartds/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/timestep_0_15.vts}"
"DATA{${paraview_test_data_directory_input}/Data/time_source.pvsm}"
"DATA{${paraview_test_data_directory_input}/Data/tube.exo}"
"DATA{${paraview_test_data_directory_input}/Data/vehicle_data.csv}"
"DATA{${paraview_test_data_directory_input}/Data/viscoplastic-ring.h5}"
......
<?xml version="1.0" ?>
<pqevents>
<!-- load state -->
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileLoadServerState" />
<pqevent object="pqClientMainWindow/FileLoadServerStateDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/time_source.pvsm" />
<pqevent object="LoadStateOptionsDialog/scrollArea/qt_scrollarea_viewport/Container/ProxyWidget/LoadStateDataFileOptions/ComboBox" command="activated" arguments="Search files under specified directory" />
<pqevent object="LoadStateOptionsDialog/widget/OKButton" command="activate" arguments="$PARAVIEW_TEST_ROOT" />
<!-- select element in pipeline browser -->
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,50,11,/0:0/0:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,50,11,/0:0/0:0" />
<!-- turn off the scalar bar -->
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/ColorEditor/ShowScalarBar" command="set_boolean" arguments="false" />
<!-- activate catalyst export window -->
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionCatalystConfigure" />
<!-- export spec d table -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/advanced" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/SaveDTable/CheckBox" command="set_boolean" arguments="true" />
<!-- export specific arrays -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RequestSpecificArrays/CheckBox" command="set_boolean" arguments="true" />
<!-- export geometry -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/filterFormat" command="activated" arguments="XMLMultiBlockDataWriter" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/filterExtract" command="set_boolean" arguments="true" />
<!-- set root directory for interactive export -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RootDirectory/RootDirectory" command="set_string" arguments="$PARAVIEW_TEST_ROOT/cinema/interactive/CinemaExportGeometry.cdb" />
<!-- export cinema database -->
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionExportImmediate" />
<!-- set root directory for batch export -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RootDirectory/RootDirectory" command="set_string" arguments="$PARAVIEW_TEST_ROOT/cinema/batch/CinemaExportGeometry.cdb" />
<!-- export catalyst script -->
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionExportCatalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst/ExportCoprocessingStateFileDialog" command="filesSelected" arguments="$PARAVIEW_TEST_ROOT/cinema/CinemaExportGeometry.py" />
</pqevents>
<?xml version="1.0" ?>
<pqevents>
<!-- load state -->
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileLoadServerState" />
<pqevent object="pqClientMainWindow/FileLoadServerStateDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/time_source.pvsm" />
<pqevent object="LoadStateOptionsDialog/scrollArea/qt_scrollarea_viewport/Container/ProxyWidget/LoadStateDataFileOptions/ComboBox" command="activated" arguments="Search files under specified directory" />
<pqevent object="LoadStateOptionsDialog/widget/OKButton" command="activate" arguments="$PARAVIEW_TEST_ROOT" />
<!-- select element in pipeline browser -->
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,50,11,/0:0/0:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,50,11,/0:0/0:0" />
<!-- turn off the scalar bar -->
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/ColorEditor/ShowScalarBar" command="set_boolean" arguments="false" />
<!-- activate catalyst export window -->
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionCatalystConfigure" />
<!-- export spec d table -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/advanced" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/SaveDTable/CheckBox" command="set_boolean" arguments="true" />
<!-- export specific arrays -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RequestSpecificArrays/CheckBox" command="set_boolean" arguments="true" />
<!-- export geometry -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/filterFormat" command="activated" arguments="XMLMultiBlockDataWriter" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/filterExtract" command="set_boolean" arguments="true" />
<!-- export cinema image database -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/viewFormat" command="activated" arguments="Cinema image database (*.cdb)" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/viewExtract" command="set_boolean" arguments="true" />
<!-- set root directory for interactive export -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RootDirectory/RootDirectory" command="set_string" arguments="$PARAVIEW_TEST_ROOT/cinema/interactive/CinemaExportGeometryAndImages.cdb" />
<!-- export cinema database -->
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionExportImmediate" />
<!-- set root directory for batch export -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RootDirectory/RootDirectory" command="set_string" arguments="$PARAVIEW_TEST_ROOT/cinema/batch/CinemaExportGeometryAndImages.cdb" />
<!-- export catalyst script -->
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionExportCatalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst/ExportCoprocessingStateFileDialog" command="filesSelected" arguments="$PARAVIEW_TEST_ROOT/cinema/CinemaExportGeometryAndImages.py" />
</pqevents>
<?xml version="1.0" ?>
<pqevents>
<!-- load state -->
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionOpenData" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/cube.vtu" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<!-- select element in pipeline browser and color -->
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,50,11,/0:0/0:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,50,11,/0:0/0:0" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="activated" arguments="f1" />
<!-- turn off the scalar bar -->
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/ColorEditor/ShowScalarBar" command="set_boolean" arguments="false" />
<!-- activate catalyst export window -->
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionCatalystConfigure" />
<!-- export spec d table -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/advanced" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/SaveDTable/CheckBox" command="set_boolean" arguments="true" />
<!-- export specific arrays -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RequestSpecificArrays/CheckBox" command="set_boolean" arguments="true" />
<!-- export geometry -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/filterFormat" command="activated" arguments="XMLPUnstructuredGridWriter" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/filterExtract" command="set_boolean" arguments="true" />
<!-- export cinema image database -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/viewFormat" command="activated" arguments="Cinema image database (*.cdb)" />
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/viewExtract" command="set_boolean" arguments="true" />
<!-- set root directory for interactive export -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RootDirectory/RootDirectory" command="set_string" arguments="$PARAVIEW_TEST_ROOT/cinema/interactive/CinemaExportNoTimesteps.cdb" />
<!-- export cinema database -->
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionExportImmediate" />
<!-- set root directory for batch export -->
<pqevent object="pqClientMainWindow/catalystInspectorDock/ExportInspector/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/scrollArea_2/qt_scrollarea_viewport/container/1pqProxyWidget0/RootDirectory/RootDirectory" command="set_string" arguments="$PARAVIEW_TEST_ROOT/cinema/batch/CinemaExportNoTimesteps.cdb" />
<!-- export catalyst script -->
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionExportCatalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst/ExportCoprocessingStateFileDialog" command="filesSelected" arguments="$PARAVIEW_TEST_ROOT/cinema/CinemaExportNoTimesteps.py" />
</pqevents>
......@@ -294,5 +294,132 @@ if (PARAVIEW_BUILD_QT_GUI)
set_tests_properties(ExportNow PROPERTIES RUN_SERIAL ON)
_set_standard_test_properties(ExportNow)
if (NOT PARAVIEW_USE_MPI)
add_test(NAME CinemaExportGeometry
COMMAND ${CMAKE_COMMAND}
-DPARAVIEW_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::paraview>
-DCOPROCESSING_TEST_DIR:PATH=${CMAKE_BINARY_DIR}/Testing/Temporary
-DPARAVIEW_TEST_XML:FILEPATH=${ParaView_SOURCE_DIR}/Applications/ParaView/Testing/XML/CinemaExportGeometry.xml
-DPVBATCH_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvbatch>
-DPVPYTHON_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvpython>
-DCOPROCESSING_DATA_DIR:PATH=${paraview_test_data_directory_output}
-DCOPROCESSING_DRIVER_SCRIPT:FILEPATH=${CMAKE_SOURCE_DIR}/Examples/Catalyst/SampleScripts/filedriver.py
-DCINEMA_DATABASE_TESTER:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportCheck.py
-DCINEMA_INPUT_DATA:FILEPATH=${CMAKE_BINARY_DIR}/ExternalData/Testing/Data/can.ex2
-DCINEMA_BATCH_SCRIPT:FILEPATH=cinema/CinemaExportGeometry.py
-DUSE_MPI:BOOL=FALSE
-DTEST_NAME:STRING=CinemaExportGeometry
-P ${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportFullWorkflowTest.cmake)
set_tests_properties(CinemaExportGeometry PROPERTIES RUN_SERIAL ON)
_set_standard_test_properties(CinemaExportGeometry)
if(NOT WIN32)
add_test(NAME CinemaExportGeometryAndImages
COMMAND ${CMAKE_COMMAND}
-DPARAVIEW_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::paraview>
-DCOPROCESSING_TEST_DIR:PATH=${CMAKE_BINARY_DIR}/Testing/Temporary
-DPARAVIEW_TEST_XML:FILEPATH=${ParaView_SOURCE_DIR}/Applications/ParaView/Testing/XML/CinemaExportGeometryAndImages.xml
-DPVBATCH_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvbatch>
-DPVPYTHON_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvpython>
-DCOPROCESSING_DATA_DIR:PATH=${paraview_test_data_directory_output}
-DCOPROCESSING_DRIVER_SCRIPT:FILEPATH=${CMAKE_SOURCE_DIR}/Examples/Catalyst/SampleScripts/filedriver.py
-DCINEMA_DATABASE_TESTER:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportCheck.py
-DCINEMA_INPUT_DATA:FILEPATH=${CMAKE_BINARY_DIR}/ExternalData/Testing/Data/can.ex2
-DCINEMA_BATCH_SCRIPT:FILEPATH=cinema/CinemaExportGeometryAndImages.py
-DUSE_MPI:BOOL=FALSE
-DTEST_NAME:STRING=CinemaExportGeometryAndImages
-P ${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportFullWorkflowTest.cmake)
set_tests_properties(CinemaExportGeometryAndImages PROPERTIES RUN_SERIAL ON)
_set_standard_test_properties(CinemaExportGeometryAndImages)
add_test(NAME CinemaExportNoTimesteps
COMMAND ${CMAKE_COMMAND}
-DPARAVIEW_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::paraview>
-DCOPROCESSING_TEST_DIR:PATH=${CMAKE_BINARY_DIR}/Testing/Temporary
-DPARAVIEW_TEST_XML:FILEPATH=${ParaView_SOURCE_DIR}/Applications/ParaView/Testing/XML/CinemaExportNoTimesteps.xml
-DPVBATCH_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvbatch>
-DPVPYTHON_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvpython>
-DCOPROCESSING_DATA_DIR:PATH=${paraview_test_data_directory_output}
-DCOPROCESSING_DRIVER_SCRIPT:FILEPATH=${CMAKE_SOURCE_DIR}/Examples/Catalyst/SampleScripts/filedriver.py
-DCINEMA_DATABASE_TESTER:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportCheck.py
-DCINEMA_INPUT_DATA:FILEPATH=${CMAKE_BINARY_DIR}/ExternalData/Testing/Data/cube.vtu
-DCINEMA_BATCH_SCRIPT:FILEPATH=cinema/CinemaExportNoTimesteps.py
-DUSE_MPI:BOOL=FALSE
-DTEST_NAME:STRING=CinemaExportNoTimesteps
-P ${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportFullWorkflowTest.cmake)
set_tests_properties(CinemaExportNoTimesteps PROPERTIES RUN_SERIAL ON)
_set_standard_test_properties(CinemaExportNoTimesteps)
endif()
else()
add_test(NAME CinemaExportGeometry
COMMAND ${CMAKE_COMMAND}
-DPARAVIEW_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::paraview>
-DCOPROCESSING_TEST_DIR:PATH=${CMAKE_BINARY_DIR}/Testing/Temporary
-DPARAVIEW_TEST_XML:FILEPATH=${ParaView_SOURCE_DIR}/Applications/ParaView/Testing/XML/CinemaExportGeometry.xml
-DPVBATCH_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvbatch>
-DPVPYTHON_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvpython>
-DCOPROCESSING_DATA_DIR:PATH=${paraview_test_data_directory_output}
-DCOPROCESSING_DRIVER_SCRIPT:FILEPATH=${CMAKE_SOURCE_DIR}/Examples/Catalyst/SampleScripts/filedriver.py
-DCINEMA_DATABASE_TESTER:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportCheck.py
-DCINEMA_INPUT_DATA:FILEPATH=${CMAKE_BINARY_DIR}/ExternalData/Testing/Data/can.ex2
-DCINEMA_BATCH_SCRIPT:FILEPATH=cinema/CinemaExportGeometry.py
-DUSE_MPI:BOOL=TRUE
-DMPIEXEC:FILEPATH=${MPIEXEC_EXECUTABLE}
-DMPIEXEC_NUMPROC_FLAG:STRING=${MPIEXEC_NUMPROC_FLAG}
-DMPIEXEC_NUMPROCS=1
-DMPIEXEC_PREFLAGS:STRING=${MPIEXEC_PREFLAGS}
-DTEST_NAME:STRING=CinemaExportGeometry
-P ${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportFullWorkflowTest.cmake)
set_tests_properties(CinemaExportGeometry PROPERTIES RUN_SERIAL ON)
_set_standard_test_properties(CinemaExportGeometry)
if(NOT WIN32)
add_test(NAME CinemaExportGeometryAndImages
COMMAND ${CMAKE_COMMAND}
-DPARAVIEW_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::paraview>
-DCOPROCESSING_TEST_DIR:PATH=${CMAKE_BINARY_DIR}/Testing/Temporary
-DPARAVIEW_TEST_XML:FILEPATH=${ParaView_SOURCE_DIR}/Applications/ParaView/Testing/XML/CinemaExportGeometryAndImages.xml
-DPVBATCH_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvbatch>
-DPVPYTHON_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvpython>
-DCOPROCESSING_DATA_DIR:PATH=${paraview_test_data_directory_output}
-DCOPROCESSING_DRIVER_SCRIPT:FILEPATH=${CMAKE_SOURCE_DIR}/Examples/Catalyst/SampleScripts/filedriver.py
-DCINEMA_DATABASE_TESTER:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportCheck.py
-DCINEMA_INPUT_DATA:FILEPATH=${CMAKE_BINARY_DIR}/ExternalData/Testing/Data/can.ex2
-DCINEMA_BATCH_SCRIPT:FILEPATH=cinema/CinemaExportGeometryAndImages.py
-DUSE_MPI:BOOL=TRUE
-DMPIEXEC:FILEPATH=${MPIEXEC_EXECUTABLE}
-DMPIEXEC_NUMPROC_FLAG:STRING=${MPIEXEC_NUMPROC_FLAG}
-DMPIEXEC_NUMPROCS=1
-DMPIEXEC_PREFLAGS:STRING=${MPIEXEC_PREFLAGS}
-DTEST_NAME:STRING=CinemaExportGeometryAndImages
-P ${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportFullWorkflowTest.cmake)
set_tests_properties(CinemaExportGeometryAndImages PROPERTIES RUN_SERIAL ON)
_set_standard_test_properties(CinemaExportGeometryAndImages)
add_test(NAME CinemaExportNoTimesteps
COMMAND ${CMAKE_COMMAND}
-DPARAVIEW_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::paraview>
-DCOPROCESSING_TEST_DIR:PATH=${CMAKE_BINARY_DIR}/Testing/Temporary
-DPARAVIEW_TEST_XML:FILEPATH=${ParaView_SOURCE_DIR}/Applications/ParaView/Testing/XML/CinemaExportNoTimesteps.xml
-DPVBATCH_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvbatch>
-DPVPYTHON_EXECUTABLE:FILEPATH=$<TARGET_FILE:ParaView::pvpython>
-DCOPROCESSING_DATA_DIR:PATH=${paraview_test_data_directory_output}
-DCOPROCESSING_DRIVER_SCRIPT:FILEPATH=${CMAKE_SOURCE_DIR}/Examples/Catalyst/SampleScripts/filedriver.py
-DCINEMA_DATABASE_TESTER:FILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportCheck.py
-DCINEMA_INPUT_DATA:FILEPATH=${CMAKE_BINARY_DIR}/ExternalData/Testing/Data/cube.vtu
-DCINEMA_BATCH_SCRIPT:FILEPATH=cinema/CinemaExportNoTimesteps.py
-DUSE_MPI:BOOL=TRUE
-DMPIEXEC:FILEPATH=${MPIEXEC_EXECUTABLE}
-DMPIEXEC_NUMPROC_FLAG:STRING=${MPIEXEC_NUMPROC_FLAG}
-DMPIEXEC_NUMPROCS=1
-DMPIEXEC_PREFLAGS:STRING=${MPIEXEC_PREFLAGS}
-DTEST_NAME:STRING=CinemaExportNoTimesteps
-P ${CMAKE_CURRENT_SOURCE_DIR}/CinemaExportFullWorkflowTest.cmake)
set_tests_properties(CinemaExportNoTimesteps PROPERTIES RUN_SERIAL ON)
_set_standard_test_properties(CinemaExportNoTimesteps)
endif()
endif()
ENDIF ()
endif()
#!/usr/bin/env python
import sys
import argparse
import os
# ----------------------------------------------------------------------------
#
# parse command line options
#
# ----------------------------------------------------------------------------
helptext = "\n\
\n\
examples: \n\
\n\
CinemaExportCheck \n\
check cinema export datasets \n\
\n\
"
# normal option parsing
parser = argparse.ArgumentParser(
description="a cinema database comparison tool",
epilog=helptext,
formatter_class=argparse.RawDescriptionHelpFormatter )
# parser.add_argument( "year", nargs="?", help="run reports for a single year" )
parser.add_argument( "-b", "--batch",
dest="batch",
default=None,
help="batch dataset")
parser.add_argument( "-i", "--interactive",
dest="interactive",
default=None,
help="interactive dataset")
args = parser.parse_args()
result = 0
print("----------------------------------------------------------")
print("Running CinemaExportCheck")
if ((args.interactive != None) and (args.batch != None)):
print(" comparing ...")
print(" batch data: {}".format(args.batch))
print(" interactive data: {}".format(args.interactive))
# TODO: Actually check if they are the same
# - In the past, we diff'ed the two and checked to see if they opened in cinema_explorer
# - Create a baseline data.csv that we know works and check against that?
else:
print(" ERROR: incorrect number of arguments")
result = 1
print("Completed CinemaExportCheck")
print("----------------------------------------------------------")
exit(result)
# CoProcessing test expects the following arguments to be passed to cmake using
# -DFoo=BAR arguments.
# PARAVIEW_EXECUTABLE -- path to paraview
# COPROCESSING_TEST_DIR -- path to temporary dir
# PARAVIEW_TEST_XML -- xml to run
# PVBATCH_EXECUTABLE -- path to pvbatch
# PVPYTHON_EXECUTABLE -- path to pvpython
# COPROCESSING_DRIVER_SCRIPT -- driver py script
# COPROCESSING_IMAGE_TESTER -- path to CoProcessingCompareImagesTester
# COPROCESSING_DATA_DIR -- path to data dir for baselines
# COPROCESSING_OUTPUTCHECK_SCRIPT -- path to outputcheck.py
# TEST_NAME -- a string to specify which results to test
# USE_MPI
# MPIEXEC
# MPIEXEC_NUMPROC_FLAG
# MPIEXEC_NUMPROCS
# MPIEXEC_PREFLAGS
macro(execute_process_with_echo)
set (_cmd)
foreach (arg ${ARGV})
set (_cmd "${_cmd} ${arg}")
endforeach()
message(STATUS "Executing command: \n ${_cmd}")
execute_process(${ARGV} WORKING_DIRECTORY ${COPROCESSING_TEST_DIR})
endmacro()
file(REMOVE
"${COPROCESSING_TEST_DIR}/cinema"
)
if (NOT EXISTS "${PARAVIEW_EXECUTABLE}")
message(FATAL_ERROR "Could not file ParaView '${PARAVIEW_EXECUTABLE}'")
endif()
# On windows, execute_process runs PARAVIEW_EXECUTABLE in background.
# We prepend "cmd /c" to force paraview's window to be shown to ensure proper
# mouse interactions with the GUI.
if(WIN32)
set(PARAVIEW_EXECUTABLE cmd /c ${PARAVIEW_EXECUTABLE})
endif()
execute_process_with_echo(COMMAND
${PARAVIEW_EXECUTABLE} -dr
--data-directory=${COPROCESSING_DATA_DIR}
--test-directory=${COPROCESSING_TEST_DIR}
--test-script=${PARAVIEW_TEST_XML}
--exit
RESULT_VARIABLE rv)
if(rv)
message(FATAL_ERROR "ParaView return value was ${rv}")
endif()
if(NOT EXISTS "${PVBATCH_EXECUTABLE}")
message(FATAL_ERROR "'${PVBATCH_EXECUTABLE}' does not exist")
endif()
message("Running pvbatch")
if("${TEST_NAME}" STREQUAL "ExportNow" )
#don't need batch for this, but the rest of the infrastructure
#is handy
set(rv 0)
elseif("${TEST_NAME}" MATCHES "CinemaExport" )
if("${TEST_NAME}" MATCHES "NoTimesteps" )
file(READ "${COPROCESSING_TEST_DIR}/${CINEMA_BATCH_SCRIPT}" batch_script_data)
string(REGEX REPLACE "'cube.vtu'" "'input'" batch_script_data "${batch_script_data}")
file(WRITE "${COPROCESSING_TEST_DIR}/${CINEMA_BATCH_SCRIPT}" "${batch_script_data}")
else()
file(READ "${COPROCESSING_TEST_DIR}/${CINEMA_BATCH_SCRIPT}" batch_script_data)
string(REGEX REPLACE "'can.ex2'" "'input'" batch_script_data "${batch_script_data}")
file(WRITE "${COPROCESSING_TEST_DIR}/${CINEMA_BATCH_SCRIPT}" "${batch_script_data}")
endif()
# run the batch script
execute_process_with_echo(COMMAND
${PVBATCH_EXECUTABLE} -sym -dr
${COPROCESSING_DRIVER_SCRIPT}
${CINEMA_INPUT_DATA}
${COPROCESSING_TEST_DIR}/${CINEMA_BATCH_SCRIPT}
WORKING_DIRECTORY ${COPROCESSING_TEST_DIR}
RESULT_VARIABLE rv)
endif()
if(rv)
message(FATAL_ERROR "pvbatch return value was = '${rv}' ")
endif()
if(NOT EXISTS "${PVPYTHON_EXECUTABLE}")
message(FATAL_ERROR "'${PVPYTHON_EXECUTABLE}' does not exist")
endif()
if(USE_MPI)
message("${CINEMA_DATABASE_TESTER}")
execute_process_with_echo(COMMAND
${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_NUMPROCS} ${MPIEXEC_PREFLAGS}
${PVPBATCH_EXECUTABLE}
${CINEMA_DATABASE_TESTER}
--interactive ${COPROCESSING_TEST_DIR}/cinema/interactive/${TEST_NAME}.cdb
--batch ${COPROCESSING_TEST_DIR}/cinema/batch/${TEST_NAME}.cdb
RESULT_VARIABLE rv)
if(rv)
message(FATAL_ERROR "CoProcessingCompareImageTester second image return value was = '${rv}' ")
endif()
else()
execute_process_with_echo(COMMAND
${PVBATCH_EXECUTABLE}
${CINEMA_DATABASE_TESTER}
--interactive ${COPROCESSING_TEST_DIR}/cinema/interactive/${TEST_NAME}.cdb
--batch ${COPROCESSING_TEST_DIR}/cinema/batch/${TEST_NAME}.cdb
RESULT_VARIABLE rv)
if(rv)
message(FATAL_ERROR "CoProcessingCompareImageTester second image return value was = '${rv}' ")
endif()
endif()
if("${TEST_NAME}" MATCHES "CinemaExport")
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/${TEST_NAME}.py")
message(FATAL_ERROR "Catalyst Script did not export successfully")
endif()
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/interactive/${TEST_NAME}.cdb/data.csv")
message(FATAL_ERROR "Cinema Spec-D Table did not export interactively (data.csv)")
endif()
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/batch/${TEST_NAME}.cdb/data.csv")
message(FATAL_ERROR "Cinema Spec-D Table did not export during batch (data.csv)")
endif()
endif()
if("${TEST_NAME}" MATCHES "CinemaExportGeometry")
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/interactive/${TEST_NAME}.cdb/can.ex2_0.vtm")
message(FATAL_ERROR "Geometry did not export interactively (can.ex2_*.vtm)")
endif()
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/batch/${TEST_NAME}.cdb/can.ex2_0.vtm")
message(FATAL_ERROR "Geometry did not export during batch (can.ex2_*.vtm)")
endif()
if(NOT "${TEST_NAME}" MATCHES "CinemaExportGeometryAndImages")
return()
endif()
elseif("${TEST_NAME}" MATCHES "CinemaExportNoTime")
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/interactive/${TEST_NAME}.cdb/cube.vtu_0.pvtu")
message(FATAL_ERROR "Geometry did not export interactively (cube.vtu_*.pvtu)")
endif()
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/batch/${TEST_NAME}.cdb/cube.vtu_0.pvtu")
message(FATAL_ERROR "Geometry did not export during batch (cube.vtu_*.pvtu)")
endif()
endif()
if("${TEST_NAME}" MATCHES "CinemaExportNoTime" OR "${TEST_NAME}" MATCHES "CinemaExportGeometryAnd")
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/interactive/${TEST_NAME}.cdb/RenderView1/info.json")
message(FATAL_ERROR "Image database did not export interactively (RenderView*)")
endif()
# There is an extra cinema directory for the batch use-case
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/cinema/batch/${TEST_NAME}.cdb/cinema/RenderView1/info.json")
message(FATAL_ERROR "Image database did not export during batch (RenderView*)")
endif()
return()
endif()
if("${TEST_NAME}" STREQUAL "ExportNow")
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/CinD/Slice1_0.vtp" AND
NOT EXISTS "${COPROCESSING_TEST_DIR}/CinD/Slice1_0.pvtp")
message(FATAL_ERROR "ExportNow did not generate a data extract!")
endif()
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/CinD/RenderView1_0.png")
message(FATAL_ERROR "ExportNow did not generate a screen capture!")
endif()
if(NOT EXISTS "${COPROCESSING_TEST_DIR}/CinD/data.csv")
message(FATAL_ERROR "ExportNow did not generate a CinemaD index!")
endif()
return()
endif()
......@@ -88,7 +88,7 @@ if rank == 0:
if hasattr(reader, "TimestepValues"):
timesteps = reader.TimestepValues
if not timesteps:
timesteps = [0]
timesteps = [0]
else:
timesteps = [0]
......
0767408e5a915c0d8154c91c260eeb6ee5b932a16efe7acc720f2ad564551769b411fcc471ea5a018d7297345f5c9d02c2d76ed3a9fd72acd3b44f0f587eb3ed
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment