Commit 405f1867 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Merge remote branch 'origin/master' into charts_in_tile_displays

* origin/master: (112 commits)
  Update superbuild so netcdf4 will work.
  BUG #12964. More fixes for loading old layouts.
  Update VTK.
  Update superbuild so netcdf4 will work.
  bump vtk to get ability to use netcdf4 with system hdf5
  Move VTK forward
  BUG 13012. Avoid errors when property is not present.
  BUG #12983. Reader had issues reading "time" with different case headers.
  BUG 13010. Add support to save default scalar bar.
  Add "pause" to ensure test playback succeeds in collaboration tests.
  COMP: Downcast vtkRender to vtkOpenGLRender before calling SetPass
  COMP: MantaBenchmark - SetUpdateExtent has to be called on algorithm
  COMP: Update vtkMantaPolyDataMapper to new VTK API
  COMP: pqCPExportStateWizard.cxx - SetInput => SetInputData
  COMP: vtkTesting::RegressionTest(...) now takes vtkAlgorithm
  Move VTK forward
  Move VisItBridge forward
  COMP: IceT code using SetPass(...) which has moved
  Remove protoc complications.
  Bring in protobuf updates to build static protoc executable.
  ...

Conflicts:
	ParaViewCore/ClientServerCore/vtkPVContextView.cxx
	ParaViewCore/ServerManager/vtkSMContextViewProxy.cxx
	VTK
parents a00dbb15 08d7113d
......@@ -80,3 +80,12 @@ IF (PARAVIEW_DATA_ROOT)
# TODO: remote rendering tests and reverse connect tests.
ENDIF (PARAVIEW_DATA_ROOT)
# Python Multi-servers test
add_test("py-multi-servers.TestMultiServersConfig"
${PARAVIEW_SMTESTDRIVER_EXECUTABLE}
--test-multi-servers 2
--server ${PARAVIEW_SERVER_EXECUTABLE}
--client ${PARAVIEW_PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/TestMultiServersConfig.py
)
from paraview.simple import *
from paraview import servermanager
import time
# Make sure the test driver know that process has properly started
print "Process started"
errors = 0
#-------------------- Helpers methods ----------------
def getHost(url):
return url.split(':')[1][2:]
def getScheme(url):
return url.split(':')[0]
def getPort(url):
return int(url.split(':')[2])
#--------------------
import os
def findInSubdirectory(filename, subdirectory=''):
if subdirectory:
path = subdirectory
else:
path = os.getcwd()
for root, dirs, names in os.walk(path):
for name in names:
if (name.find(filename) > -1) and ( (name.find('.dll') > -1) or (name.find('.so') > -1) or (name.find('.dylib') > -1)):
return os.path.join(root, name)
raise 'File not found'
#--------------------
print "Start multi-server testing"
enableMultiServer()
options = servermanager.vtkProcessModule.GetProcessModule().GetOptions()
available_server_urls = options.GetServerURL().split('|')
built_in_connection = servermanager.ActiveConnection
# Search plugin path
plugin_path = findInSubdirectory('PacMan', options.GetApplicationPath()[0:-12]);
print "====> Found plugin path: ", plugin_path
# Test if the built-in connection is here
if (len(servermanager.MultiServerConnections) != 1):
errors += 1
print "Error pvpython should be connected to a built-in session. Currently connected to ", servermanager.MultiServerConnections
url = available_server_urls[0]
print "Connect to first server ", url
server1_connection = Connect(getHost(url), getPort(url))
# Test that we have one more connection
if (len(servermanager.MultiServerConnections) != 2):
errors += 1
print "Error pvpython should be connected to a built-in session + one remote one. Currently connected to ", servermanager.MultiServerConnections
url = available_server_urls[1]
print "Connect to second server ", url
server2_connection = Connect(getHost(url), getPort(url))
# Test that we have one more connection
if (len(servermanager.MultiServerConnections) != 3):
errors += 1
print "Error pvpython should be connected to a built-in session + two remote one. Currently connected to ", servermanager.MultiServerConnections
print "Available connections: ", servermanager.MultiServerConnections
# Test that last created connection is the active one
if ( servermanager.ActiveConnection != server2_connection):
errors += 1
print "Error Invalid active connection. Expected ", server2_connection, " and got ", servermanager.ActiveConnection
# Test that switchActiveConnection is working as expected
switchActiveConnection(server1_connection, globals())
if ( servermanager.ActiveConnection != server1_connection):
errors += 1
print "Error Invalid active connection. Expected ", server1_connection, " and got ", servermanager.ActiveConnection
# Test that switchActiveConnection is working as expected
switchActiveConnection(built_in_connection, globals())
if ( servermanager.ActiveConnection != built_in_connection):
errors += 1
print "Error Invalid active connection. Expected ", built_in_connection, " and got ", servermanager.ActiveConnection
# Test that switchActiveConnection is working as expected
switchActiveConnection(server2_connection, globals())
if ( servermanager.ActiveConnection != server2_connection):
errors += 1
print "Error Invalid active connection. Expected ", server2_connection, " and got ", servermanager.ActiveConnection
# Load plugin on server2
switchActiveConnection(server2_connection, globals())
LoadPlugin(plugin_path, True, globals())
# Create PacMan on server2
pacMan_s2 = PacMan()
# Swtich to server1 and Create PacMan ==> This should fail
switchActiveConnection(server1_connection, globals())
try:
pacMan_s1 = PacMan()
errors += 1
print "Error: PacMan should not be available on Server1"
except NameError:
print "OK: PacMan is not available on server1"
# Swtich to server2 with globals and switch back to server1 with not updating the globals
switchActiveConnection(server2_connection, globals())
switchActiveConnection(server1_connection)
# Create PacMan ==> This should fail
try:
pacMan_s1 = PacMan()
errors += 1
print "Error: PacMan should not be available on Server1"
except RuntimeError:
print "OK: PacMan is not available on server1"
# Make sure built-in as not the pacMan
switchActiveConnection(server2_connection, globals())
switchActiveConnection(built_in_connection, globals())
try:
pacMan_builtin = PacMan()
errors += 1
print "Error: PacMan should not be available on built-in"
except NameError:
print "OK: PacMan is not available on built-in"
# Load plugin localy for built-in
# Create PacMan ==> This should be OK on built-in
switchActiveConnection(built_in_connection, globals())
LoadPlugin(plugin_path, False, globals())
pacMan_builtin = PacMan()
print "After loading the plugin locally in built-in, the PacMan definition is available"
# Swtich to server1 and Create PacMan ==> This should fail
switchActiveConnection(server1_connection, globals())
try:
pacMan_s1 = PacMan()
errors += 1
print "Error: PacMan should not be available on Server1"
except NameError:
print "OK: PacMan is still not available on server1"
# Disconnect and quit application...
Disconnect()
print "Available connections after disconnect: ", servermanager.MultiServerConnections
Disconnect()
print "Available connections after disconnect: ", servermanager.MultiServerConnections
Disconnect()
print "Available connections after disconnect: ", servermanager.MultiServerConnections
if errors > 0:
raise RuntimeError, "An error occured during the execution"
......@@ -142,6 +142,10 @@ IF ("1" STREQUAL ${HAS_NUMPY})
SET(TESTS_WITH_BASELINES ${TESTS_WITH_BASELINES} ${CMAKE_CURRENT_SOURCE_DIR}/FindDataDialog.xml)
ENDIF ("1" STREQUAL ${HAS_NUMPY})
# These tests cannot be run using ctest -j since they are affected by focus
# changed events.
set (AnimatePipelineTime_FORCE_SERIAL TRUE)
# Set properties for CTH tests
set(CTHAMRBaseline_BREAK TRUE)
......@@ -202,6 +206,7 @@ SET (XYHistogram_BREAK TRUE)
SET(ExtractLevel_BREAK TRUE)
SET(Fractal2D_BREAK TRUE)
# Add image threshold overrides for tests.
# Generally all tests with wireframes need higher thresholds.
......@@ -418,6 +423,11 @@ set (XdmfGridAttributes_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING})
set (XYChart_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING})
set (ZLibXDMF_ENABLE_COLLAB ${PARAVIEW_COLLABORATION_TESTING})
set(TESTS_WITH_MULTI_SERVERS_3
${CMAKE_CURRENT_SOURCE_DIR}/TestMultiServer3.xml
)
IF (PARAVIEW_DATA_ROOT)
set (TESTS_WITHOUT_BASELINES
${TESTS_WITHOUT_BASELINES}
......@@ -460,4 +470,7 @@ IF (PARAVIEW_DATA_ROOT)
BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline
TEST_SCRIPTS ${TESTS_WITH_BASELINES})
add_multi_server_tests("pvcs-multi-servers" 3
BASELINE_DIR ${PARAVIEW_DATA_ROOT}/Baseline
TEST_SCRIPTS ${TESTS_WITH_MULTI_SERVERS_3})
ENDIF (PARAVIEW_DATA_ROOT)
......@@ -23,5 +23,4 @@
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.1/Viewport" command="mouseRelease" arguments="(0.421603,0.503333,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.2/TitleBar" command="mousePress" arguments="1,1,0,150,9" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.2/TitleBar" command="mouseRelease" arguments="1,0,0,150,9" />
<pqevent object="pqClientMainWindow/menubar/menuTools" command="activate" arguments="actionTesting_Window_Size" />
</pqevents>
......@@ -10,6 +10,4 @@
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="ConeSource" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/TitleBar" command="mousePress" arguments="(0.33234,0.316206,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/TitleBar" command="mouseRelease" arguments="(0.52608,0.634387,1,0,0)" />
</pqevents>
......@@ -3,15 +3,17 @@
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionOpenData" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Data/SPCTH/spyplothistory.hscth" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow" command="pause" arguments="500"/>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="TableToPolyData" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/XColumn" command="set_string" arguments="XPOSITION" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/YColumn" command="set_string" arguments="YPOSITION" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/ZColumn" command="set_string" arguments="ZPOSITION" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/SplitHorizontal" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.2/EmptyView/scrollArea/qt_scrollarea_viewport/widgetFoo/ConvertActionsFrame/RenderView" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.1/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow" command="pause" arguments="500"/>
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/EmptyView/scrollArea/qt_scrollarea_viewport/widgetFoo/ConvertActionsFrame/RenderView" command="activate" arguments="" />
<pqevent object="pqClientMainWindow" command="pause" arguments="500"/>
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,11,14,/0:0/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,11,14,/0:0/0:0/0:1" />
<pqevent object="pqClientMainWindow/VCRToolbar/actionVCRPlay" command="activate" arguments="" />
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,55,8,/0:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,55,8,/0:0" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="ArrowSource" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,76,11,/1:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,76,11,/1:0" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="ConeSource" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,67,10,/2:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,67,10,/2:0" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="CylinderSource" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/Resolution/LineEdit" command="set_string" arguments="60" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/Resolution/LineEdit" command="set_string" arguments="60" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,60,7,/3:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,60,7,/3:0" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="RTAnalyticSource" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/pqProxyGroupMenuManager0/Clip" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/objectInspectorDock/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/ClipFunction/pqImplicitPlaneWidget/show3DWidget" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_tabbar" command="set_tab_with_text" arguments="Layout #1" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/TestMultiServer1.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_tabbar" command="set_tab_with_text" arguments="Layout #2" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget2/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/TestMultiServer2.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_tabbar" command="set_tab_with_text" arguments="Layout #4" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget4/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/TestMultiServer4.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_tabbar" command="set_tab_with_text" arguments="Layout #3" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget3/Frame.0/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/TestMultiServer3.png" width="300" height="300" />
</pqevents>
if(WIN32)
set(ENV{PATH} "@PARAVIEW_FIXUP_BUNDLE_SEARCH_PATHS@;$ENV{PATH}")
elseif(APPLE)
set(dyld_lib_path "@QT_LIBRARY_DIR@:$ENV{DYLD_LIBRARY_PATH}")
set(SEARCH_PATHS @PARAVIEW_FIXUP_BUNDLE_SEARCH_PATHS@)
foreach(path ${SEARCH_PATHS})
set(dyld_lib_path "${dyld_lib_path}:${path}")
endforeach()
set(ENV{DYLD_LIBRARY_PATH} ${dyld_lib_path})
else(WIN32)
get_filename_component(PYTHON_LIB "@PYTHON_LIBRARY@" PATH)
get_filename_component(MPI_LIB "@MPI_LIBRARY@" PATH)
set(ld_lib_path "${MPI_LIB}:${PYTHON_LIB}:@QT_LIBRARY_DIR@:$ENV{LD_LIBRARY_PATH}")
set(SEARCH_PATHS @PARAVIEW_FIXUP_BUNDLE_SEARCH_PATHS@)
foreach(path ${SEARCH_PATHS})
set(ld_lib_path "${ld_lib_path}:${path}")
endforeach()
set(ENV{LD_LIBRARY_PATH} ${ld_lib_path})
endif(WIN32)
execute_process(
COMMAND "@PROTOC_LOCATION@" "--cpp_out=dllexport_decl=VTK_PROTOBUF_EXPORT:@CMAKE_CURRENT_BINARY_DIR@" --proto_path "@CMAKE_CURRENT_SOURCE_DIR@/Resources" "@CMAKE_CURRENT_SOURCE_DIR@/Resources/vtkPVMessage.proto"
WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@"
)
......@@ -27,6 +27,8 @@ FUNCTION (add_pv_test prefix skip_test_flag_suffix)
set (counter 0)
set (extra_args)
set (full_test_name)
set (force_serial FALSE)
while (${counter} LESS ${TEST_GROUP_SIZE})
list(LENGTH ACT_TEST_SCRIPTS num_tests)
if (num_tests)
......@@ -57,6 +59,9 @@ FUNCTION (add_pv_test prefix skip_test_flag_suffix)
if (DEFINED ${test_name}_BREAK)
set (counter 100000) # stop the group.
endif (DEFINED ${test_name}_BREAK)
if (${test_name}_FORCE_SERIAL)
set (force_serial TRUE)
endif (${test_name}_FORCE_SERIAL)
endwhile (${counter} LESS ${TEST_GROUP_SIZE})
if (extra_args)
......@@ -66,6 +71,10 @@ FUNCTION (add_pv_test prefix skip_test_flag_suffix)
${extra_args}
--exit
)
if (force_serial)
set_tests_properties("${prefix}${full_test_name}" PROPERTIES RUN_SERIAL ON)
message(STATUS "Running in serial \"${prefix}${full_test_name}\"")
endif()
endif (extra_args)
endwhile (ACT_TEST_SCRIPTS)
......@@ -133,6 +142,33 @@ FUNCTION(add_multi_client_tests prefix)
${extra_args}
--exit
)
if (${test_name}_FORCE_SERIAL)
set_tests_properties("${prefix}.${test_name}" PROPERTIES RUN_SERIAL ON)
message(STATUS "Running in serial \"${prefix}.${test_name}\"")
endif (${test_name}_FORCE_SERIAL)
endif()
endforeach(test_script)
ENDFUNCTION(add_multi_client_tests)
FUNCTION(add_multi_server_tests prefix nbServers)
PV_PARSE_ARGUMENTS(ACT "TEST_SCRIPTS;BASELINE_DIR" "" ${ARGN})
foreach (test_script ${ACT_TEST_SCRIPTS})
get_filename_component(test_name ${test_script} NAME_WE)
set (extra_args)
process_args(extra_args)
add_test("${prefix}.${test_name}"
${PARAVIEW_SMTESTDRIVER_EXECUTABLE}
--test-multi-servers ${nbServers}
--server ${PARAVIEW_SERVER_EXECUTABLE}
--client ${CLIENT_EXECUTABLE}
-dr
--disable-light-kit
--test-directory=${PARAVIEW_TEST_DIR}
--test-script=${test_script}
${extra_args}
--exit
)
endforeach(test_script)
ENDFUNCTION(add_multi_server_tests)
......@@ -447,7 +447,7 @@ IF (NOT PV_INSTALL_NO_DEVELOPMENT)
SET(ParaView_BINARY_DIR "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_BIN_DIR}")
SET(PARAVIEW_USE_FILE "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_CMAKE_DIR}/ParaViewUse.cmake")
SET(PARAVIEW_VTK_DIR "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_LIB_DIR}")
SET(VTK_WRAP_ClientServer_EXE_CONFIG "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_BIN_DIR}/vtkWrapClientServer")
SET(VTK_WRAP_ClientServer_EXE_CONFIG "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_BIN_DIR}/vtkWrapClientServer${PV_EXE_SUFFIX}")
SET(PARAVIEW_INCLUDE_DIRS "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_INCLUDE_DIR}")
SET(ParaView_QT_DIR "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_INCLUDE_DIR}/Qt")
SET(PARAVIEW_QT_QMAKE_EXECUTABLE "")
......
......@@ -63,7 +63,7 @@ int main(int argc, char* argv[])
double threshold = atof(argv[2]);
if(!testing->RegressionTest(vtkImageData::SafeDownCast(reader->GetOutput()), threshold))
if(!testing->RegressionTest(reader, threshold))
{
return 1;
}
......
......@@ -54,7 +54,6 @@ int main(int argc, char* argv[])
vtkSMTestDriver::vtkSMTestDriver()
{
this->AllowErrorInOutput = 0;
this->RenderServerNumProcesses = 0;
this->TimeOut = 300;
this->ServerExitTimeOut = 60;
this->TestRenderServer = 0;
......@@ -63,6 +62,7 @@ vtkSMTestDriver::vtkSMTestDriver()
this->ReverseConnection = 0;
this->TestRemoteRendering = 0;
this->TestMultiClient = 0;
this->NumberOfServers = 1;
}
vtkSMTestDriver::~vtkSMTestDriver()
......@@ -235,7 +235,12 @@ int vtkSMTestDriver::ProcessCommandLine(int argc, char* argv[])
if(strcmp(argv[i], "--test-multi-clients") == 0)
{
this->TestMultiClient = 1;
fprintf(stderr, "Test Tiled Display.\n");
fprintf(stderr, "Test collaboration.\n");
}
if(strcmp(argv[i], "--test-multi-servers") == 0)
{
this->NumberOfServers = atoi(argv[i+1]);
fprintf(stderr, "Test multi-servers with %d servers.\n", this->NumberOfServers);
}
if(strcmp(argv[i], "--one-mpi-np") == 0)
{
......@@ -417,6 +422,11 @@ vtkSMTestDriver::CreateCommandLine(vtksys_stl::vector<const char*>& commandLine,
commandLine.push_back("--multi-clients");
}
if (type == CLIENT && this->NumberOfServers > 1)
{
commandLine.insert(++commandLine.begin(), "--multi-servers");
}
#ifdef PV_TEST_USE_RANDOM_PORTS
if (!this->ReverseConnection)
{
......@@ -583,8 +593,11 @@ int vtkSMTestDriver::OutputStringHasError(const char* pname, std::string& output
{\
vtksysProcess_Delete(clients[__kk]);\
}\
vtksysProcess_Delete(renderServer); \
vtksysProcess_Delete(server);
for (size_t __kk=0; __kk < this->NumberOfServers; __kk++)\
{\
if(!renderServers.empty()) vtksysProcess_Delete(renderServers[__kk]); \
if(!servers.empty()) vtksysProcess_Delete(servers[__kk]); \
}
//----------------------------------------------------------------------------
int vtkSMTestDriver::Main(int argc, char* argv[])
......@@ -628,28 +641,30 @@ int vtkSMTestDriver::Main(int argc, char* argv[])
// mpi code
// Allocate process managers.
vtksysProcess* renderServer = 0;
vtksysProcess* server = 0;
std::vector<vtksysProcess*> renderServers;
std::vector<vtksysProcess*> servers;
std::vector<vtksysProcess*> clients;
if(this->TestRenderServer)
for (size_t i=0; this->TestRenderServer && i < this->NumberOfServers; i++)
{
renderServer = vtksysProcess_New();
vtksysProcess* renderServer = vtksysProcess_New();
if(!renderServer)
{
VTK_CLEAN_PROCESSES;
cerr << "vtkSMTestDriver: Cannot allocate vtksysProcess to run the render server.\n";
return 1;
}
renderServers.push_back(renderServer);
}
if(this->TestServer)
for (size_t i=0; this->TestServer && i < this->NumberOfServers; i++)
{
server = vtksysProcess_New();
vtksysProcess* server = vtksysProcess_New();
if(!server)
{
VTK_CLEAN_PROCESSES;
cerr << "vtkSMTestDriver: Cannot allocate vtksysProcess to run the server (or dataserver).\n";
return 1;
}
servers.push_back(server);
}
for (size_t cc=0; cc < this->ClientExecutables.size(); cc++)
......@@ -689,71 +704,125 @@ int vtkSMTestDriver::Main(int argc, char* argv[])
}
// Now run the server
this->SetupServer(server);
if(!this->StartProcess(server, "server"))
if(!servers.empty())
{
this->Stop(clients[0], "client");
VTK_CLEAN_PROCESSES;
return -1;
this->SetupServer(servers[0]);
if(!this->StartProcess(servers[0], "server"))
{
this->Stop(clients[0], "client");
VTK_CLEAN_PROCESSES;
return -1;
}
}
// Now run the render server
this->SetupRenderServer(renderServer);
if(!this->StartProcess(renderServer, "renderserver"))
if(!renderServers.empty())
{
this->Stop(clients[0], "client");
this->Stop(server, "server");
VTK_CLEAN_PROCESSES;
return -1;
this->SetupRenderServer(renderServers[0]);
if(!this->StartProcess(renderServers[0], "renderserver"))
{
this->Stop(clients[0], "client");
this->Stop(servers[0], "server");
VTK_CLEAN_PROCESSES;
return -1;
}
}
}
else
{
// Start the render server if there is one.
std::string rs_connection_info;
this->SetupRenderServer(renderServer);
if(!this->StartProcessAndWait(renderServer, "renderserver",
RenderServerStdOut, RenderServerStdErr, "Accepting connection(s):",
rs_connection_info))
std::vector<std::string> rs_connection_infos;
for( std::vector<vtksysProcess*>::iterator iter = renderServers.begin();
iter != renderServers.end();
iter++ )
{
cerr << "vtkSMTestDriver: Render server never started.\n";
VTK_CLEAN_PROCESSES;
return -1;
vtksysProcess* renderServer = *iter;
std::string rs_connection_info;
this->SetupRenderServer(renderServer);
vtksys_ios::ostringstream processName;
processName << "renderserver " << rs_connection_infos.size();
if(!this->StartProcessAndWait(renderServer, processName.str().c_str(),
RenderServerStdOut, RenderServerStdErr, "Accepting connection(s):",
rs_connection_info))
{
cerr << "vtkSMTestDriver: Render server never started.\n";
VTK_CLEAN_PROCESSES;
return -1;
}
rs_connection_infos.push_back(rs_connection_info);
}
// Start the data server if there is one.
std::string s_connection_info;
this->SetupServer(server);
if(!this->StartProcessAndWait(server, renderServer? "dataserver": "server",
ServerStdOut, ServerStdErr, "Accepting connection(s):",
s_connection_info))
std::vector<std::string> s_connection_infos;
for( std::vector<vtksysProcess*>::iterator iter = servers.begin();
iter != servers.end();
iter++ )
{
this->Stop(renderServer, "renderserver");
cerr << "vtkSMTestDriver: Server never started.\n";
VTK_CLEAN_PROCESSES;
return -1;
vtksysProcess* server = *iter;
std::string s_connection_info;
this->SetupServer(server);
vtksys_ios::ostringstream processName;
processName << (renderServers.empty() ? "server " : "dataserver ")
<< s_connection_infos.size();
if(!this->StartProcessAndWait(server, processName.str().c_str(),