Commit 4de48b3a authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

add tile display tests (and infrastructure)

parent c43049db
ec5f08d7d80a761a546bdc4783cdaba7295796421dc9adcc15300c88417957a5b88eae608654c4430d8147bac163c4a94c904ae599b20ff19b69c4da1126399f
6182f4e63e2369b7ff8f7de1dd7b660210518d11f1dbf69a744840392cb63271ad796279102bab7eb420e4259200db723fe595e6bc52b5a9ec6b74d3b57a1a3b
dc95df62ef4f9e9b13e6b467ab3e428e1956e515c14ba5331eadcc44cb68ffdf11cba3b4a2ca3fe78f14d51d596e9afa36a0a1c89df752b89b6f30ba42aeef09
49abf7c0f6eb8d24adacee85a94b0c612a1d358a148d80f78b50c80d3a9020e24772e1149de3764451c67f2bfb4f934e0c5792e16517b6f7a2fb04d925797d83
0f84f1ce5aa56197478b1ba8c4f5fbeb3158d3f89bf0e4fe8976f7d252a2bde5956efc3b1243fa11c40ba1bce66de2c5a5219750e14dd65ced3a03d07eb100a3
4b2bd8f49c51c013b0b7e1d47532d2deed226c7a08a5e5d64b5a741d5b06f503c53ebe98697e247a47eae218db05bdf82d19f105f00bdf35e299dcb9b20dd8f0
eb6391de3c6c1babc449aae87ac4d47c3ca574b8afd6f052be6dcd521fcac206d7dc528599c42587661270182f3b38e4e66e13882d3c394d402a5a3bf5aa75eb
04054c203afea28f00abc24e6ce9642692f4fed67255170ae745f97b1a26e3ed5022bcc4e86092569bc97a82d8d6597d00fb0c46d6a2ec7421133deb962de9d9
d63ce2f6fbe4f4c1554710f570cffd2d9c31b1aa04d55caba69914cb6412a35052d1afa47883b5d909a4a87176c932ccf4f48170885d76391aa7c3cd1e9ab19e
b6f06fc9f4e937602e602684b8ce84ca46afe80f8371f801ae57b1485f455201616a46b84c36d5c7155471ed36cfff304742a9005bce2cccb557afdcf427cd90
cdfa45759a8fcdba156d3d8b0635e4843b784385143b503474bf71c17dc6015d276c3b1db0dae416f58bba4895525e30a34c47b7a354aca958872ad1a367ede7
1a598348782530c8f59f8e4b9785a40ef20c370109687d4bf1e21564425b5d63199a88f811b3ec71a8504177b293330c47c52b1c109f252e1ef4f07b7fdaaa2e
20f49d939dc84ab1b3ac5322518eed95760e60dbfd2657a430ba2507ac769be75f7b4edffc787ded2fbaa2d87ba2ea1dfdd02c049cfed2913d999c5955b55026
8829fa3fda63fcaf8fd9079336455a7e670a4bced28edcf5e3430a3692e54e0d8508a9960a9d6333ae675ccaedc67f6c3928565580c85f3c9747c40ec45dd5a4
831306af8d30e28683aec034bba30a97e91aedda1e5e9475db62548d78ca1db6ce1b98a58f8128a7854e2240a738d331e0d8fa27614646186a184e422f5e4c3a
2bfd0cb90fb608a64354b9e1edaa09877ef3cbbdf8b671b16bd8b17e50952282f8a253a49bd8baf29a123513a1cca781aacada99042e791daa00d50ecfd24d90
13a55f5a610ca7f10a0930890410795bc36bf68577b3d478a191a70095e0b314e17a82dd6fbbcbddceed35edaaa75aa4b3ef50bd8dfff5e5bf0082ee5722d24a
0bc52cfc477116165e4a04706d6fdf4932d765975c4bdeeecc9692e5dd6bdafa02f0d45ff12b901ecb837ca25854e5463ffd7a7a86909993e18124c36aa3a438
5a041e43f6726763c40d209ee2c9b1caf3e0dd0dc747a3de7b5e3f777843f4acf3e8671b781040175627c71e135da800f6129fe310571c1476a31db0b1351009
1aa61faaa1b52a2b82cce135dc780583bad16a9a50bc985dcf00bc0042c9a796156e0e8033c81be2725bfb53f4b38d3ad83cd29ac9533eca724276cb2589dbdd
ae3f42bfc9dfe6587c469354a593ee16209d05e8bfb1a123b5701e4c15994378752d40377ff492a3f8737075c2af99d316d4b294d234b416cb87dc8a65e09a75
000524e44fe661810ee7b50d0d472904328c4ac195a0f0b30595e0513452e900c47435f3b783bc507804606d6e88c30117b39413334ccae72197cf7145c9ae8d
48ca524dff33b07cf123e8242c64e21e50dffbe2fd3d6f724bd30a91f04f24eb41347b65c575529102efb1573eb0d142378be09440b253aab1dbaea432ff50aa
d9aa3b02aa240661f0a222a88f2993b9998e7ef82b9c411fbe90287028551aa11e3abb2b3be4fd188facd166fe09a18016b54251a21ad0ecceb4c398d2859d00
8893bc0db4e0bdd06648e25e993a83a361cc2f45279ef26a77add07c0b541497b10881c8aa6e166dfa51624680dc46f0555ab4477cb3226430a13b1d0d16e5b9
71fc89d11138d821ee703c48f6a8bcc46d51042478cdc23d3c2f34e9f48201edc8fd775122aee2fb2f9c21d5d806ab914d68d71f9e324c64be6e216c35b3f51b
6d3434e04be2920747c9def1832187cd123df99139b303e010cfbd89ebceaed82ba111fa58ae4541032ef810f3f07ca30551de866d56e499e2528ddf466ad883
9403e9c74beca95011ba9b052c247ee9e56288a6929ac802e83e073d7845506c175ab459839728efa7bc1c7a1eca84d7d52fb2f2536c5ef1730855f64df9ccdd
6ec90ea04d588c50a6a57bdf341c9808e3f5ee55ea4c6a7ee8f4b47745d825f4dc55245104206b23e78d4dcc40ad4be410f2f5b36721c148769016b9439b734a
69921246a0730e2b8108605aa2c8658f0fcda2c15af49c5eeb19e7624a769183c3db55463e10594761725e5b37a18d7c8a9f067c2b03e991d644134b6b04dd24
50decef3f4c1d3330d7e1cc3213c2dbcc237b0a09f68a79e7401e14c38be1c5c8cae9196ab6bb96ee3f2ebe746d1e6352b778d8b0c19ebc66105c801ae768ea3
2c9f4f8ea337006385ad6d57d15bbe52fea15209868af6e00303d84448838bd3fcccb1110620cbb1a8f3b2dbe2aca83212a20a4871f98f737921f701ecd32ab0
f07129d6acc00632ae7fdd1b0fcad6d86835de02eec050badde774d36b85e1b6226dc5d76d5e92fb8fb6ad0bdcc4f9c2baf25a1252d1e7115efb316eb20abb6e
e84de4f679861df40da6c2225dee616512787f2bff408c96d3bb120512f9158ef2c0e749d0778790d6f04fd97cc0331680d46a6894c96bb8a1bbd7d6e9a9fb44
7125b6e507a174f89d72542e92f74211e62562a7f33e6e0193953bc68e800fb7c25493c2ea87810078c809eed6243f034777277b52074ae9c714a7a4c43e7bde
794949f0ede8d83db53a3a8c7d6698e7c330f36b184e98ef7442c2d9ab86e2b9f0c57110175bd29dea126b5029c28099392ed1835d7338e9d283641701159410
......@@ -332,32 +332,12 @@ ExternalData_Expand_Arguments(ParaViewData _
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TestPythonViewScript.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/Threshold.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/ThresholdInvert.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile0_1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile0_2.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile0_3.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile0_4.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile1_1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile1_2.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile1_3.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile1_4.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-1x2-Tile1_5.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-2x2-Tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-2x2-Tile1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-2x2-Tile2.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplay3DTesting-2x2-Tile3.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x1-Tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x1-Tile0_1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x1-Tile1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x1-Tile1_1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x1-Tile1_2.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x1-Tile1_3.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x1-Tile1_4.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x2-Tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x2-Tile1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x2-Tile2.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplayScatterPlot-2x2-Tile3.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplaySplitView-1x1-tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplaySplitView-2x1-tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplaySplitView-2x1-tile1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplaySplitView-3x1-tile0.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplaySplitView-3x1-tile1.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TileDisplaySplitView-3x1-tile2.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TimeStepProgressBar_Inter.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TraceExodus.png}"
"DATA{${CMAKE_CURRENT_SOURCE_DIR}/../Data/Baseline/TraceMultiViews.png}"
......@@ -1557,36 +1537,15 @@ paraview_add_multi_server_tests(3
BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
TEST_SCRIPTS ${TESTS_WITH_MULTI_SERVERS_3})
# Removing these test since these have been failing for a while the the testing
# infrastrructure not catching it properly until now. We need to redo the tile display
# testing :(.
#set (TileDisplayScatterPlot-2x1_THRESHOLD 40)
#add_tile_display_tests("pvcs-tile-display" 2 1
# BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
# TEST_SCRIPTS TileDisplayScatterPlot-2x1.xml)
#
#set (TileDisplayScatterPlot-2x2_THRESHOLD 40)
#add_tile_display_tests("pvcs-tile-display" 2 2
# BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
# TEST_SCRIPTS TileDisplayScatterPlot-2x2.xml)
# These tests have been behaving badly across many platforms and needs to be
# fixed before it can be useful. Disabling for now, see bug #15424.
#set (TileDisplay3DTesting-1x2_THRESHOLD 270)
#add_tile_display_tests("pvcs-tile-display" 1 2
# BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
# TEST_SCRIPTS TileDisplay3DTesting-1x2.xml)
#set (TileDisplay3DTesting-2x2_THRESHOLD 270)
#paraview_add_tile_display_tests(2 2
# BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
# TEST_SCRIPTS TileDisplay3DTesting-2x2.xml)
set (TileDisplay3DTesting-2x1_THRESHOLD 270)
paraview_add_tile_display_tests(2 1
BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
TEST_SCRIPTS TileDisplay3DTesting-2x1.xml)
# set (TileDisplay3DTesting-2x1_THRESHOLD 270)
paraview_add_tile_display_tests(1 1
TEST_SCRIPTS TileDisplaySplitView.xml)
if (PARAVIEW_USE_MPI)
paraview_add_tile_display_tests(2 1
TEST_SCRIPTS TileDisplaySplitView.xml)
paraview_add_tile_display_tests(3 1
TEST_SCRIPTS TileDisplaySplitView.xml)
endif()
#------------------------------------------------------------------
# Add tests that test command line arguments (among other things).
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="RTAnalyticSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/representationToolbar/displayRepresentation/comboBox" command="set_string" arguments="Surface" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="set_string" arguments="RTData" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/SplitHorizontal" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="ProbeLine" />
<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/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.633333,0.0786517,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.633333,0.0786517,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.633333,0.0786517,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.866667,0.0655431,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.866667,0.0655431,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.866667,0.0655431,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.287179,0.0898876,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.287179,0.0898876,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.287179,0.0898876,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.712821,0.138577,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.712821,0.138577,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.712821,0.138577,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/TitleBar" command="mousePress" arguments="1,1,0,217,5" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/TitleBar" command="mouseRelease" arguments="1,0,0,217,5" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/TitleBar" command="mousePress" arguments="1,1,0,243,10" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/TitleBar" command="mouseRelease" arguments="1,0,0,243,10" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<!-- These don't work right, see bug #15424: -->
<!-- <pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplay3DTesting-2x1-Tile0.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplay3DTesting-2x1-Tile0.png" />-->
<!-- <pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplay3DTesting-2x1-Tile1.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplay3DTesting-2x1-Tile1.png" />-->
</pqevents>
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="RTAnalyticSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/representationToolbar/displayRepresentation/comboBox" command="set_string" arguments="Surface" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="set_string" arguments="RTData" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/SplitHorizontal" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="ProbeLine" />
<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/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.633333,0.0786517,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.633333,0.0786517,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.633333,0.0786517,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.866667,0.0655431,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.866667,0.0655431,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.866667,0.0655431,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.287179,0.0898876,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.287179,0.0898876,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.287179,0.0898876,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.712821,0.138577,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.712821,0.138577,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.712821,0.138577,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/TitleBar" command="mousePress" arguments="1,1,0,217,5" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/TitleBar" command="mouseRelease" arguments="1,0,0,217,5" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/TitleBar" command="mousePress" arguments="1,1,0,243,10" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/TitleBar" command="mouseRelease" arguments="1,0,0,243,10" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplay3DTesting-2x2-Tile0.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplay3DTesting-2x2-Tile0.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplay3DTesting-2x2-Tile1.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplay3DTesting-2x2-Tile1.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplay3DTesting-2x2-Tile2.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplay3DTesting-2x2-Tile2.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplay3DTesting-2x2-Tile3.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplay3DTesting-2x2-Tile3.png" />
</pqevents>
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileOpen" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/vehicle_data.csv" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/CentralWidgetFrame/EmptyView/scrollArea/qt_scrollarea_viewport/widgetFoo/ConvertActionsFrame/PlotMatrixView" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,11,13,/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,11,13,/0:0/0:1" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplayScatterPlot-2x1-Tile0.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplayScatterPlot-2x1-Tile0.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplayScatterPlot-2x1-Tile1.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplayScatterPlot-2x1-Tile1.png" />
</pqevents>
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileOpen" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/vehicle_data.csv" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/CentralWidgetFrame/EmptyView/scrollArea/qt_scrollarea_viewport/widgetFoo/ConvertActionsFrame/PlotMatrixView" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,11,13,/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,11,13,/0:0/0:1" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplayScatterPlot-2x2-Tile0.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplayScatterPlot-2x2-Tile0.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplayScatterPlot-2x2-Tile1.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplayScatterPlot-2x2-Tile1.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplayScatterPlot-2x2-Tile2.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplayScatterPlot-2x2-Tile2.png" />
<pqcompareimage image="$PARAVIEW_TEST_ROOT/TileDisplayScatterPlot-2x2-Tile3.png" baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplayScatterPlot-2x2-Tile3.png" />
</pqevents>
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="RTAnalyticSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/DataAnalysis" command="activate" arguments="ProbeLine" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.1/SplitVertical" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.4/CentralWidgetFrame/EmptyView/scrollArea/qt_scrollarea_viewport/widgetFoo/ConvertActionsFrame/SpreadSheetView" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.2/SplitVertical" 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/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="ElevationFilter" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/show3DWidget" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/TitleBar/TitleLabel" command="mousePress" arguments="1,1,0,48,4" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/TitleBar/TitleLabel" command="mouseMove" arguments="1,0,0,58,4" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/TitleBar/TitleLabel" command="mouseRelease" arguments="1,0,0,58,4" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources/Alphabetical" command="activate" arguments="TextSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<!-- tile on 1x1 -->
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/CentralWidgetFrame/Viewport"
tdx="1" tdy="1" rank="0"
baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplaySplitView-1x1-tile0.png" />
<!-- tiles on 2x1 -->
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/CentralWidgetFrame/Viewport"
tdx="2" tdy="1" rank="0"
baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplaySplitView-2x1-tile0.png" />
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/CentralWidgetFrame/Viewport"
tdx="2" tdy="1" rank="1"
baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplaySplitView-2x1-tile1.png" />
<!-- tiles on 3x1 -->
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/CentralWidgetFrame/Viewport"
tdx="3" tdy="1" rank="0"
baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplaySplitView-3x1-tile0.png" />
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/CentralWidgetFrame/Viewport"
tdx="3" tdy="1" rank="1"
baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplaySplitView-3x1-tile1.png" />
<pqcomparetile object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.3/CentralWidgetFrame/Viewport"
tdx="3" tdy="1" rank="2"
baseline="$PARAVIEW_DATA_ROOT/Applications/ParaView/Testing/Data/Baseline/TileDisplaySplitView-3x1-tile2.png" />
<!--
< ! - - switch to gradient background - - >
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionLoadPalette" command="activate" arguments="" />
<pqevent object="LoadPaletteMenu" command="activate" arguments="Gradient Background" />
< !- - close the spreadsheet view - - >
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.4/Close" command="activate" arguments="" />
-->
</pqevents>
......@@ -293,28 +293,32 @@ function (paraview_add_multi_server_tests count)
endfunction ()
function (paraview_add_tile_display_tests width height)
if (NOT PARAVIEW_USE_MPI)
math(EXPR _paraview_add_tile_display_cpu_count "${width} * ${height}")
if (_paraview_add_tile_display_cpu_count GREATER 1 AND NOT PARAVIEW_USE_MPI)
# we can run 1x1 tile display tests on non MPI builds.
return ()
endif ()
math(EXPR _paraview_add_tile_display_cpu_count "${width} * ${height} - 1")
_paraview_add_tests("paraview_add_tile_display_tests"
FORCE_SERIAL
PREFIX "pvcs-tile-display"
SUFFIX "-${width}x${height}"
ENVIRONMENT
PV_ICET_WINDOW_BORDERS=1
SMTESTDRIVER_MPI_NUMPROCS=${_paraview_add_tile_display_cpu_count}
_COMMAND_PATTERN
--test-tiled "${width}" "${height}"
--server "$<TARGET_FILE:ParaView::pvserver>"
--enable-bt
-tdx=${width}
-tdy=${height}
# using offscreen to avoid clobbering display (although should not be
# necessary) when running tests in parallel.
--force-offscreen-rendering
--client __paraview_client__
--enable-bt
__paraview_args__
__paraview_script__
__paraview_client_args__
"--tile-image-prefix=${CMAKE_BINARY_DIR}/Testing/Temporary/__paraview_test_name__"
-dr
--exit
${ARGN})
......
......@@ -18,6 +18,7 @@
#include "vtkCamera.h"
#include "vtkCommand.h"
#include "vtkCommunicator.h"
#include "vtkMultiProcessController.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
......@@ -26,6 +27,7 @@
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLState.h"
#include "vtkPNGWriter.h"
#include "vtkPVLogger.h"
#include "vtkPVOptions.h"
#include "vtkPVProcessWindow.h"
......@@ -38,6 +40,7 @@
#include "vtkVector.h"
#include "vtkVectorOperators.h"
#include "vtkWeakPointer.h"
#include "vtkWindowToImageFilter.h"
#include <vector>
......@@ -458,6 +461,40 @@ bool vtkViewLayout::NeedsActiveStereo() const
return false;
}
//----------------------------------------------------------------------------
bool vtkViewLayout::SaveAsPNG(int rank, const char* filename)
{
auto processWindow = vtkPVProcessWindow::GetRenderWindow();
auto pm = vtkProcessModule::GetProcessModule();
if (processWindow)
{
int result = 0;
if (pm->GetPartitionId() == rank)
{
vtkLogF(INFO, "saving tile to %s", filename);
vtkNew<vtkWindowToImageFilter> wif;
wif->SetReadFrontBuffer(false);
wif->SetShouldRerender(true);
wif->SetInput(processWindow);
wif->Update();
vtkNew<vtkPNGWriter> writer;
writer->SetFileName(filename);
writer->SetInputDataObject(wif->GetOutput());
writer->Write();
result = 1;
}
int all_result = result;
if (pm->GetNumberOfLocalPartitions() > 1)
{
pm->GetGlobalController()->Reduce(&result, &all_result, 1, 0, vtkCommunicator::MAX_OP);
}
return all_result > 0;
}
return false;
}
//----------------------------------------------------------------------------
void vtkViewLayout::PrintSelf(ostream& os, vtkIndent indent)
{
......
......@@ -66,6 +66,12 @@ public:
void AddView(vtkPVView*, const double* viewport);
//@}
/**
* Intended for testing and debugging. When called, this will save the layout
* results to an png file.
*/
bool SaveAsPNG(int rank, const char* fname);
protected:
vtkViewLayout();
~vtkViewLayout() override;
......
......@@ -1182,6 +1182,17 @@ std::vector<vtkSMViewProxy*> vtkSMViewLayoutProxy::GetViews()
return views;
}
//----------------------------------------------------------------------------
void vtkSMViewLayoutProxy::SaveAsPNG(int rank, const char* fname)
{
vtkClientServerStream stream;
stream << vtkClientServerStream::Invoke << VTKOBJECT(this) << "SaveAsPNG" << rank << fname
<< vtkClientServerStream::End;
this->ExecuteStream(stream, false, vtkPVSession::RENDER_SERVER);
// ensure that the server is done saving the image before proceeding.
this->GetLastResult(vtkPVSession::RENDER_SERVER_ROOT);
}
//----------------------------------------------------------------------------
void vtkSMViewLayoutProxy::PrintSelf(ostream& os, vtkIndent indent)
{
......
......@@ -300,6 +300,16 @@ public:
vtkGetMacro(SeparatorWidth, int);
//@}
//@{
/**
* This is only meant for testing and debugging purposes. This allows the
* application to save the image rendered on the server side in certain
* configurations (tile display and cave) to a png file for regression
* testing.
*/
void SaveAsPNG(int rank, const char* fname);
//@}
protected:
vtkSMViewLayoutProxy();
~vtkSMViewLayoutProxy() override;
......
......@@ -129,12 +129,6 @@ void pqCommandLineOptionsBehavior::processCommandLineOptions()
// default one).
assert(pqActiveObjects::instance().activeServer() != 0);
// For tile display testing lets enable the dump of images
if (options->GetTileImagePath())
{
// FIXME
}
// check for --data option.
if (options->GetParaViewDataName())
{
......
......@@ -63,6 +63,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqQVTKWidget.h"
#include "pqQVTKWidgetEventPlayer.h"
#include "pqQVTKWidgetEventTranslator.h"
#include "pqServer.h"
#include "pqServerManagerModel.h"
#include "pqView.h"
#include "pqXMLEventObserver.h"
......@@ -77,9 +78,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkPNGWriter.h"
#include "vtkPNMWriter.h"
#include "vtkPVConfig.h"
#include "vtkPVServerInformation.h"
#include "vtkProcessModule.h"
#include "vtkRenderWindow.h"
#include "vtkSMPropertyHelper.h"
#include "vtkSMViewLayoutProxy.h"
#include "vtkSMViewProxy.h"
#include "vtkSmartPointer.h"
#include "vtkTIFFWriter.h"
......@@ -402,3 +405,59 @@ bool pqCoreTestUtility::CompareImage(const QString& testPNGImage, const QString&
return pqCoreTestUtility::CompareImage(
reader->GetOutput(), referenceImage, threshold, output, tempDirectory);
}
//-----------------------------------------------------------------------------
QString pqCoreTestUtility::fixPath(const QString& path)
{
QString newpath = path;
newpath.replace("$PARAVIEW_TEST_ROOT", pqCoreTestUtility::TestDirectory());
newpath.replace("$PARAVIEW_TEST_BASELINE_DIR", pqCoreTestUtility::BaselineDirectory());
newpath.replace("$PARAVIEW_DATA_ROOT", pqCoreTestUtility::DataRoot());
return newpath;
}
//-----------------------------------------------------------------------------
bool pqCoreTestUtility::CompareTile(QWidget* widget, int rank, int tdx, int tdy,
const QString& baseline, double threshold, ostream& output, const QString& tempDirectory)
{
// try to locate a pqView, if any associated with the QWidget.
auto views = pqApplicationCore::instance()->getServerManagerModel()->findItems<pqView*>();
for (pqView* view : views)
{
if (view && (view->widget() == widget))
{
return pqCoreTestUtility::CompareTile(
view, rank, tdx, tdy, baseline, threshold, output, tempDirectory);
}
}
qFatal("CompareTile not supported on the provided widget");
return false;
}
//-----------------------------------------------------------------------------
bool pqCoreTestUtility::CompareTile(pqView* view, int rank, int tdx, int tdy,
const QString& baseline, double threshold, ostream& output, const QString& tempDirectory)
{
auto layout = view ? vtkSMViewLayoutProxy::FindLayout(view->getViewProxy()) : nullptr;
if (!layout)
{
return false;
}
if (tdx >= 1 && tdy >= 1)
{
auto serverInfo = view->getServer()->getServerInformation();
if (!serverInfo || serverInfo->GetTileDimensions()[0] != tdx ||
serverInfo->GetTileDimensions()[1] != tdy)
{
// skip compare.
return true;
}
}
const QString imagepath =
QString("%1/tile-%2.png").arg(tempDirectory).arg(QFileInfo(baseline).baseName());
layout->SaveAsPNG(rank, imagepath.toLocal8Bit().data());
return pqCoreTestUtility::CompareImage(imagepath, baseline, threshold, output, tempDirectory);
}
......@@ -58,6 +58,12 @@ public:
pqCoreTestUtility(QObject* parent = 0);
~pqCoreTestUtility() override;
/**
* Cleans up patch to replace $PARAVIEW_TEST_ROOT and $PARAVIEW_DATA_ROOT
* with appropriate paths specified on the command line.
*/
static QString fixPath(const QString& path);
public:
/**
* Returns the absolute path to the PARAVIEW_DATA_ROOT in canonical form
......@@ -112,6 +118,11 @@ public:
static const char* PQ_COMPAREVIEW_PROPERTY_NAME;
static bool CompareTile(QWidget* widget, int rank, int tdx, int tdy, const QString& baseline,
double threshold, ostream& output, const QString& tempDirectory);
static bool CompareTile(pqView* widget, int rank, int tdx, int tdy, const QString& baseline,
double threshold, ostream& output, const QString& tempDirectory);
private:
QStringList TestFilenames;
};
......
......@@ -81,7 +81,6 @@ pqOptions::pqOptions()
this->PythonScript = 0;
this->TestMaster = 0;
this->TestSlave = 0;
this->TileImagePath = 0;
}
//-----------------------------------------------------------------------------
......@@ -93,7 +92,6 @@ pqOptions::~pqOptions()
this->SetServerResourceName(0);
this->SetStateFileName(0);
this->SetPythonScript(0);
this->SetTileImagePath(0);
}
//-----------------------------------------------------------------------------
......@@ -107,9 +105,6 @@ void pqOptions::Initialize()