Commit b9dc9cbf authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

add test for cave display.

parent 2961cbc3
b4a5a47aeca797a5634681ef3637ed849d6855b69a989686bfbcc02d6e318458a0e0239b18388f26b921cc33f545751e75ec894c773d8ee389e4073a0c565fa4
709d9e97b65824da6c5fb681ae7845120398ed63e4672acdfacb427837b3eef0eee9de885def5b87ecc10036b66a88ba80dca8dadd399bc60083daf1b8bfe053
......@@ -310,6 +310,8 @@ ExternalData_Expand_Arguments(ParaViewData _
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/StepColorSpaceA.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/StructuredGridCellBlanking.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/StructuredGridVolumeRendering.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TestCAVE-tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TestCAVE-tile1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TestClipCylinder.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TestColorHistogram.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TestColorHistogram_1.png}"
......@@ -1541,7 +1543,6 @@ paraview_add_multi_server_tests(3
BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
TEST_SCRIPTS ${TESTS_WITH_MULTI_SERVERS_3})
# set (TileDisplay3DTesting-2x1_THRESHOLD 270)
paraview_add_tile_display_tests(1 1
TEST_SCRIPTS TileDisplaySplitView.xml)
if (PARAVIEW_USE_MPI)
......@@ -1553,6 +1554,9 @@ if (PARAVIEW_USE_MPI)
TEST_SCRIPTS TileDisplaySplitView.xml)
endif()
paraview_add_cave_tests(2 "${CMAKE_CURRENT_SOURCE_DIR}/LeftRight.pvx"
TEST_SCRIPTS TestCAVE.xml)
#------------------------------------------------------------------
# Add tests that test command line arguments (among other things).
#------------------------------------------------------------------
......
<?xml version="1.0" ?>
<pvx>
<Process Type="server">
<!-- Two screen configuration Left and right (YAY) -->
<Machine Name="Right"
LowerLeft="-2 -1 -2"
LowerRight="0 -1 -2"
UpperRight="0 1 -2" />
<Machine Name="Left"
LowerLeft="0 -1 -2"
LowerRight="2 -1 -2"
UpperRight="2 1 -2" />
</Process>
</pvx>
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="ConeSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_tabbar" command="set_tab_with_text" arguments="+" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_tabbar" command="set_tab_with_text" arguments="Layout #2" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="SphereSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="SphereSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Center/DoubleLineEdit0" command="set_string" arguments="-1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="SphereSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Center/DoubleLineEdit0" command="set_string" arguments="-2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="SphereSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Center/DoubleLineEdit0" command="set_string" arguments="2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget2/Container/Frame.0/actionBackButton" command="activate" arguments="" />
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget2/Container/Frame.0/CentralWidgetFrame/Viewport"
rank="0" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TestCAVE-tile0.png" />
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget2/Container/Frame.0/CentralWidgetFrame/Viewport"
rank="1" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TestCAVE-tile1.png" />
</pqevents>
......@@ -323,3 +323,33 @@ function (paraview_add_tile_display_tests width height)
--exit
${ARGN})
endfunction ()
function (paraview_add_cave_tests num_ranks config)
if (num_ranks GREATER 1 AND NOT PARAVIEW_USE_MPI)
return ()
endif ()
get_filename_component(_config_name "${config}" NAME_WE)
_paraview_add_tests("paraview_add_cave_tests"
PREFIX "pvcs-cave-${_config_name}"
SUFFIX "-${num_ranks}"
ENVIRONMENT
PV_SHARED_WINDOW_SIZE=400x300
SMTESTDRIVER_MPI_NUMPROCS=${num_ranks}
_COMMAND_PATTERN
--server "$<TARGET_FILE:ParaView::pvserver>"
--enable-bt
# using offscreen to avoid clobbering display (although should not be
# necessary) when running tests in parallel.
--force-offscreen-rendering
${config}
--client __paraview_client__
--enable-bt
__paraview_args__
__paraview_script__
__paraview_client_args__
-dr
--exit
${ARGN})
endfunction ()
......@@ -391,7 +391,8 @@ void vtkViewLayout::UpdateDisplay(vtkObject* sender, unsigned long, void*)
processWindow->Render();
vtkOpenGLRenderUtilities::MarkDebugEvent("vtkViewLayout::UpdateDisplayForTileDisplay End");
internals.ActiveRenderWindow = nullptr;
// note, we don't restore active window to null here since we want it to be
// preserved for `SaveAsPNG` if it gets called for testing purposes.
}
//----------------------------------------------------------------------------
......@@ -515,7 +516,9 @@ bool vtkViewLayout::SaveAsPNG(int rank, const char* filename)
wif->SetReadFrontBuffer(false);
wif->SetShouldRerender(true);
wif->SetInput(processWindow);
processWindow->SetSwapBuffers(false);
wif->Update();
processWindow->SetSwapBuffers(true);
vtkNew<vtkPNGWriter> writer;
writer->SetFileName(filename);
......
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