Commit 3a744a2f authored by Burlen Loring's avatar Burlen Loring

stack trace command line option

Added a command line option(--enable-bt) to enable KWSys stack
trace signal handler. For SM XML, Python, and Batch ctests enable
the stack trace handler by the new command line option.

Added a test to report system info including OpenGL and MPI
versions to aid remote debugging for unfamiliar dashboard
systems.

Change-Id: Icdea9d423a6bfbf7d960c4d691ddb60c03032143
parent bf42bb84
......@@ -5,10 +5,12 @@ if (FOUND_NUMPY)
# Add pvpython tests
add_test(NAME pvpython.TestPythonAnnotationFilter
COMMAND pvpython
--enable-bt
--data=${PARAVIEW_DATA_ROOT}/Data/can.ex2
${CMAKE_CURRENT_SOURCE_DIR}/TestPythonAnnotationFilter.py)
add_test(NAME pvpython.TestPythonAnnotationFilterNoMerge
COMMAND pvpython
--enable-bt
--data=${PARAVIEW_DATA_ROOT}/Data/can.ex2
${CMAKE_CURRENT_SOURCE_DIR}/TestPythonAnnotationFilterNoMerge.py)
set_tests_properties(
......@@ -24,6 +26,7 @@ ENDIF (PARAVIEW_DATA_ROOT)
if(BUILD_SHARED_LIBS)
add_test(NAME py-multi-servers.TestMultiServersConfig
COMMAND smTestDriver
--enable-bt
--test-multi-servers 2
--server $<TARGET_FILE:pvserver>
--client $<TARGET_FILE:pvpython>
......@@ -32,6 +35,7 @@ if(BUILD_SHARED_LIBS)
add_test(NAME py-multi-servers.TestMultiServersRemoteProxy
COMMAND smTestDriver
--enable-bt
--test-multi-servers 3
--server $<TARGET_FILE:pvserver>
--client $<TARGET_FILE:pvpython>
......@@ -40,6 +44,7 @@ if(BUILD_SHARED_LIBS)
add_test(NAME py-multi-servers.TestRemoteProgrammableFilter
COMMAND smTestDriver
--enable-bt
--server $<TARGET_FILE:pvserver>
--client $<TARGET_FILE:pvpython>
${CMAKE_CURRENT_SOURCE_DIR}/TestRemoteProgrammableFilter.py
......
......@@ -184,6 +184,7 @@ if (EXISTS "${smooth_flash}" AND PARAVIEW_DATA_ROOT)
foreach (tname ${streaming_tests})
add_pv_test("pv" "_DISABLE_C"
COMMAND --client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
--enable-streaming
--disable-light-kit
......@@ -194,8 +195,10 @@ if (EXISTS "${smooth_flash}" AND PARAVIEW_DATA_ROOT)
add_pv_test(pvcs "_DISABLE_CS"
COMMAND
--server $<TARGET_FILE:pvserver>
--enable-bt
--enable-streaming
--client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
--enable-streaming
--disable-light-kit
......@@ -617,6 +620,7 @@ IF (PARAVIEW_DATA_ROOT)
"${CMAKE_CURRENT_BINARY_DIR}/exodusStateFile.3.14.1.pvsm" @ONLY)
add_pv_test("pv" "_DISABLE_C"
COMMAND --client $<TARGET_FILE:paraview>
--enable-bt
-dr
--test-directory=${PARAVIEW_TEST_DIR}
--state=${CMAKE_CURRENT_BINARY_DIR}/exodusStateFile.3.14.1.pvsm
......
......@@ -43,7 +43,7 @@ FUNCTION (add_pv_test prefix skip_test_flag_suffix)
list(INSERT ACT_TEST_SCRIPTS 0 ${test})
endif (${test_name}_BREAK)
endif (${counter} GREATER 0)
if (${counter} LESS 100000)
if (NOT ${test_name}${skip_test_flag_suffix})
set (full_test_name "${full_test_name}.${test_name}")
......@@ -67,6 +67,7 @@ FUNCTION (add_pv_test prefix skip_test_flag_suffix)
if (extra_args)
ADD_TEST(NAME "${prefix}${full_test_name}"
COMMAND smTestDriver
--enable-bt
${ACT_COMMAND}
${extra_args}
--exit
......@@ -75,7 +76,7 @@ FUNCTION (add_pv_test prefix skip_test_flag_suffix)
set_tests_properties("${prefix}${full_test_name}" PROPERTIES RUN_SERIAL ON)
message(STATUS "Running in serial \"${prefix}${full_test_name}\"")
endif()
# add the "PARAVIEW" label to the test properties. this allows for the user
# to instruct cmake to run just the ParaView tests with the '-L' flag
set_tests_properties("${prefix}${full_test_name}" PROPERTIES LABELS "PARAVIEW")
......@@ -89,8 +90,9 @@ ENDFUNCTION (add_pv_test)
FUNCTION (add_client_tests prefix)
PV_EXTRACT_CLIENT_SERVER_ARGS(${ARGN})
add_pv_test(${prefix} "_DISABLE_C"
add_pv_test(${prefix} "_DISABLE_C"
COMMAND --client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
${CLIENT_SERVER_ARGS}
--disable-light-kit
......@@ -103,8 +105,10 @@ FUNCTION (add_client_server_tests prefix)
add_pv_test(${prefix} "_DISABLE_CS"
COMMAND
--server $<TARGET_FILE:pvserver>
--enable-bt
${CLIENT_SERVER_ARGS}
--client ${CLIENT_EXECUTABLE}
--enable-bt
${CLIENT_SERVER_ARGS}
-dr
--disable-light-kit
......@@ -117,10 +121,13 @@ FUNCTION (add_client_render_server_tests prefix)
add_pv_test(${prefix} "_DISABLE_CRS"
COMMAND
--data-server $<TARGET_FILE:pvdataserver>
--enable-bt
${CLIENT_SERVER_ARGS}
--render-server $<TARGET_FILE:pvrenderserver>
--enable-bt
${CLIENT_SERVER_ARGS}
--client ${CLIENT_EXECUTABLE}
--enable-bt
${CLIENT_SERVER_ARGS}
-dr
--disable-light-kit
......@@ -145,8 +152,10 @@ FUNCTION(add_multi_client_tests prefix)
COMMAND smTestDriver
--test-multi-clients
--server $<TARGET_FILE:pvserver>
--enable-bt
--client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
--disable-light-kit
--test-directory=${PARAVIEW_TEST_DIR}
......@@ -156,6 +165,7 @@ FUNCTION(add_multi_client_tests prefix)
--exit
--client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
--disable-light-kit
--test-directory=${PARAVIEW_TEST_DIR}
......@@ -184,8 +194,10 @@ FUNCTION(add_multi_server_tests prefix nbServers)
COMMAND smTestDriver
--test-multi-servers ${nbServers}
--server $<TARGET_FILE:pvserver>
--enable-bt
--client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
--disable-light-kit
--test-directory=${PARAVIEW_TEST_DIR}
......@@ -216,8 +228,10 @@ FUNCTION (add_tile_display_tests prefix tdx tdy )
COMMAND smTestDriver
--test-tiled ${tdx} ${tdy}
--server $<TARGET_FILE:pvserver>
--enable-bt
${CLIENT_SERVER_ARGS}
--client ${CLIENT_EXECUTABLE}
--enable-bt
${CLIENT_SERVER_ARGS}
-dr
--disable-light-kit
......
......@@ -45,12 +45,10 @@ vtkPVOptions::vtkPVOptions()
this->UseRenderingGroup = 0;
this->ParaViewDataName = 0;
this->StateFileName = 0;
this->TestPlugin = 0;
this->TestPluginPath = 0;
this->SetTestPlugin("");
this->SetTestPluginPath("");
this->TileDimensions[0] = 0;
this->TileDimensions[1] = 0;
this->TileMullions[0] = 0;
......@@ -60,22 +58,14 @@ vtkPVOptions::vtkPVOptions()
this->MultiClientMode = 0;
this->MultiClientModeWithErrorMacro = 0;
this->MultiServerMode = 0;
this->RenderServerMode = 0;
this->SymmetricMPIMode = 0;
this->TellVersion = 0;
this->EnableStreaming = 0;
this->UseCudaInterop = 0;
this->SatelliteMessageIds = 0;
this->PrintMonitors = 0;
this->ServerURL = 0;
this->ReverseConnection = 0;
this->UseStereoRendering = 0;
this->UseOffscreenRendering = 0;
......@@ -83,8 +73,8 @@ vtkPVOptions::vtkPVOptions()
this->LogFileName = 0;
this->StereoType = 0;
this->SetStereoType("Anaglyph");
this->Timeout = 0;
this->EnableStackTrace = 0;
if (this->XMLParser)
{
......@@ -261,7 +251,10 @@ void vtkPVOptions::Initialize()
vtkPVOptions::ALLPROCESS);
this->AddBooleanArgument("--print-monitors", 0, &this->PrintMonitors,
"Print detected monitors and exit (windows only).");
"Print detected monitors and exit (Windows only).");
this->AddBooleanArgument("--enable-bt", 0, &this->EnableStackTrace,
"Enable stack trace signal handler.");
}
//----------------------------------------------------------------------------
......@@ -304,6 +297,17 @@ int vtkPVOptions::PostProcess(int, const char* const*)
}
#endif //PARAVIEW_ALWAYS_SECURE_CONNECTION
// do this here for simplicity since it's
// a universal option. The current kwsys implementation
// is for POSIX compliant OS's, and a NOOP on others
// but passing the flag on for all ensures that when
// implementations for non-POSIX OS's are finished they're
// enabled as well.
if (this->EnableStackTrace)
{
vtksys::SystemInformation::SetStackTraceOnError(1);
}
return 1;
}
......@@ -414,6 +418,9 @@ void vtkPVOptions::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "EnableStreaming:" <<
(this->EnableStreaming? "yes" : "no") << endl;
os << indent << "EnableStackTrace:" <<
(this->EnableStackTrace? "yes" : "no") << endl;
os << indent << "UseCudaInterop " << this->UseCudaInterop << std::endl;
os << indent << "SatelliteMessageIds " << this->SatelliteMessageIds << std::endl;
os << indent << "PrintMonitors" << this->PrintMonitors << std::endl;
......
......@@ -139,6 +139,12 @@ public:
vtkGetStringMacro(TestPlugin);
vtkGetStringMacro(TestPluginPath);
// Description:
// Flag for controlling auto generation of stack trace on POSIX
// systems after crash.
vtkGetMacro(EnableStackTrace, int);
vtkSetMacro(EnableStackTrace, int);
enum ProcessTypeEnum
{
PARAVIEW = 0x2,
......@@ -182,33 +188,25 @@ protected:
// Description:
// Subclasses may need to access these
char* ParaViewDataName;
//server URL information
vtkSetStringMacro(ServerURL);
char* ServerURL;
char* ServerURL; // server URL information
int ServerMode;
int ClientMode;
int RenderServerMode;
int MultiClientMode;
int MultiClientModeWithErrorMacro;
int MultiServerMode;
int SymmetricMPIMode;
char* StateFileName; // loading state file(Bug #5711)
char* TestPlugin; // to load plugins from command line for tests
char* TestPluginPath;
// Command Option for loading state file(Bug #5711)
// inline setters
vtkSetStringMacro(ServerURL);
vtkSetStringMacro(StateFileName);
char* StateFileName;
// Option to load plugins from command line for tests
vtkSetStringMacro(TestPlugin);
vtkSetStringMacro(TestPluginPath);
char* TestPlugin;
char* TestPluginPath;
private:
// Options:
int ConnectID;
int UseOffscreenRendering;
int UseStereoRendering;
......@@ -217,21 +215,17 @@ private:
int TileMullions[2];
int UseRenderingGroup;
int Timeout;
char* LogFileName;
int TellVersion;
vtkSetStringMacro(StereoType);
char* StereoType;
int EnableStreaming;
int UseCudaInterop;
int SatelliteMessageIds;
int PrintMonitors;
int EnableStackTrace;
// inline setters
vtkSetStringMacro(StereoType);
//ETX
private:
......
SET(TestNames
ParaViewCoreClientServerCorePrintSelf
ParaViewCoreClientServerCorePrintSelf
TestMPI
TestSystemCaps
)
vtk_module_test_executable(${vtk-module}PrintSelf
ParaViewCoreClientServerCorePrintSelf.cxx)
add_test(NAME ${vtk-module}PrintSelf
COMMAND ${vtk-module}PrintSelf)
COMMAND ${vtk-module}PrintSelf)
vtk_module_test_executable(TestMPI TestMPI.cxx)
add_test(NAME TestMPI COMMAND TestMPI)
set_tests_properties(${vtk-module}PrintSelf TestMPI PROPERTIES LABELS "PARAVIEW")
vtk_module_test_executable(TestSystemCaps TestSystemCaps.cxx)
add_test(NAME TestSystemCaps COMMAND TestSystemCaps)
if (PARAVIEW_USE_MPI)
set_source_files_properties(TestSystemCaps
PROPERTIES COMPILE_DEFINITIONS TEST_MPI_CAPS)
endif()
set_tests_properties(
${vtk-module}PrintSelf
TestMPI
TestSystemCaps
PROPERTIES LABELS "PARAVIEW"
)
#include "vtkSetGet.h"
#include "vtkRenderWindow.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLExtensionManager.h"
#include <vtksys/SystemInformation.hxx>
#if defined(TEST_MPI_CAPS)
# include "vtkMPI.h"
#endif
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
#if defined(TEST_MPI_CAPS)
// info about the MPI libraru
int major=0, minor=0;
MPI_Get_version(&major, &minor);
char libVer[MPI_MAX_LIBRARY_VERSION_STRING] = {'\0'};
int libVerLen = MPI_MAX_LIBRARY_VERSION_STRING;
MPI_Get_library_version(libVer, &libVerLen);
libVer[libVerLen] = '\0';
#endif
// info about the Open GL
vtkRenderWindow *rwin = vtkRenderWindow::New();
rwin->Render();
vtkOpenGLRenderWindow *context
= vtkOpenGLRenderWindow::SafeDownCast(rwin);
if (!context)
{
vtkGenericWarningMacro(
<< "ERROR: Implement support for" << rwin->GetClassName());
return 1;
}
vtkOpenGLExtensionManager *extensions = context->GetExtensionManager();
// info about the host
vtksys::SystemInformation sysinfo;
sysinfo.RunCPUCheck();
sysinfo.RunOSCheck();
// make the report
cout << "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)" << endl
<< endl
<< "Host System:" << endl
<< "OS = " << sysinfo.GetOSDescription() << endl
<< "CPU = " << sysinfo.GetCPUDescription() << endl
<< "RAM = " << sysinfo.GetMemoryDescription() << endl
<< endl
#if defined(TEST_MPI_CAPS)
<< "MPI:" << endl
<< "Version = " << major << "." << minor << endl
<< "Library Version = " << libVer << endl
<< endl
#endif
<< "OpenGL:" << endl
<< "DriverGLVersion = " << extensions->GetDriverGLVersion() << endl
<< "DriverGLVendor = " << extensions->GetDriverGLVendor() << endl
<< "DriverGLRenderer = " << extensions->GetDriverGLRenderer() << endl
<< "DriverGLVersionMajor = " << extensions->GetDriverGLVersionMajor() << endl
<< "DriverGLVersionMinor = " << extensions->GetDriverGLVersionMinor() << endl
<< "DriverGLVersionPatch = " << extensions->GetDriverGLVersionPatch() << endl
<< "DriverVersionMajor = " << extensions->GetDriverVersionMajor() << endl
<< "DriverVersionMinor = " << extensions->GetDriverVersionMinor() << endl
<< "DriverVersionPatch = " << extensions->GetDriverVersionPatch() << endl
<< "DriverIsATI = " << extensions->DriverIsATI() << endl
<< "DriverIsNvidia = " << extensions->DriverIsNvidia() << endl
<< "DriverIsIntel = " << extensions->DriverIsIntel() << endl
<< "DriverIsMesa = " << extensions->DriverIsMesa() << endl
<< "DriverGLRendererIsOSMesa = " << extensions->DriverGLRendererIsOSMesa() << endl
<< "DriverIsMicrosoft = " << extensions->DriverIsMicrosoft() << endl
<< "Extensions = " << extensions->GetExtensionsString() << endl
<< endl;
rwin->Delete();
// always pass
return 0;
}
......@@ -9,7 +9,7 @@ vtk_module_test_executable(TestMultipleSessions
#------------------------------------------------------------------------------
set(test_srcs
ParaViewCoreServerManagerPrintSelf
TestComparativeAnimationCueProxy
TestComparativeAnimationCueProxy
TestXMLSaveLoadState
TestProxyAnnotation
)
......@@ -41,10 +41,11 @@ if (PARAVIEW_DATA_ROOT)
ExtractGrid
TestPHT
SPCTH2)
foreach (tfile ${TEST_STATES})
add_test(NAME ${tfile}-ServerManager
COMMAND ServerManagerStateLoader
--enable-bt
-D=${PARAVIEW_DATA_ROOT}
-T=${ParaView_BINARY_DIR}/Testing/Temporary
-V=${PARAVIEW_DATA_ROOT}/Baseline/${tfile}.png
......
......@@ -16,11 +16,13 @@ IF (PARAVIEW_DATA_ROOT)
FOREACH (tfile ${SMSTATE_FILES})
ADD_TEST(NAME "${tfile}-ServerManagerPython"
COMMAND $<TARGET_FILE:pvpython>
--enable-bt
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages/paraview/smtesting.py"
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
-V ${PARAVIEW_DATA_ROOT}/Baseline/${tfile}.png
--state ${CMAKE_CURRENT_SOURCE_DIR}/../SMStates/${tfile}.pvsm)
--state ${CMAKE_CURRENT_SOURCE_DIR}/../SMStates/${tfile}.pvsm
)
set_tests_properties(${tfile}-ServerManagerPython PROPERTIES LABELS "PARAVIEW")
ENDFOREACH (tfile)
......@@ -28,12 +30,14 @@ IF (PARAVIEW_DATA_ROOT)
# state for regression testing.
ADD_TEST(NAME "LoadSave-ServerManagerPython"
COMMAND $<TARGET_FILE:pvpython>
--enable-bt
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages/paraview/smtesting.py"
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
-V ${PARAVIEW_DATA_ROOT}/Baseline/Arrow.png
--state ${CMAKE_CURRENT_SOURCE_DIR}/../SMStates/Arrow.pvsm
--use_saved_state)
--use_saved_state
)
set_tests_properties(LoadSave-ServerManagerPython PROPERTIES LABELS "PARAVIEW")
ENDIF ()
......@@ -66,11 +70,13 @@ IF (PARAVIEW_DATA_ROOT)
FOREACH (tfile ${PY_TESTS})
ADD_TEST(NAME "${tfile}-ServerManagerPython"
COMMAND $<TARGET_FILE:pvpython>
--enable-bt
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
-V ${PARAVIEW_DATA_ROOT}/Baseline/${tfile}.png
-S ${SMSTATE_FILE_DIR})
-S ${SMSTATE_FILE_DIR}
)
set_tests_properties(${tfile}-ServerManagerPython PROPERTIES LABELS "PARAVIEW")
ENDFOREACH(tfile)
ENDIF ()
......@@ -102,10 +108,12 @@ IF (PARAVIEW_DATA_ROOT)
FOREACH (tfile ${PY_TESTS_NO_BASELINE})
ADD_TEST(NAME "${tfile}-ServerManagerPython"
COMMAND $<TARGET_FILE:pvpython>
--enable-bt
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
-S ${SMSTATE_FILE_DIR})
-S ${SMSTATE_FILE_DIR}
)
set_tests_properties(${tfile}-ServerManagerPython PROPERTIES LABELS "PARAVIEW")
ENDFOREACH(tfile)
......@@ -145,16 +153,19 @@ IF (PARAVIEW_DATA_ROOT)
ADD_TEST(NAME ${tfile}-Batch
COMMAND ${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
$<TARGET_FILE:pvbatch>
--enable-bt
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
-V ${PARAVIEW_DATA_ROOT}/Baseline/${tfile}.png
-S ${SMSTATE_FILE_DIR})
-S ${SMSTATE_FILE_DIR}
)
ADD_TEST(NAME ${tfile}-SymmetricBatch
COMMAND ${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
$<TARGET_FILE:pvbatch>
--symmetric
--enable-bt
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
......@@ -171,6 +182,7 @@ IF (PARAVIEW_DATA_ROOT)
ADD_TEST(NAME ${tfile}-SymmetricBatch
COMMAND $<TARGET_FILE:pvbatch>
--enable-bt
--symmetric
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-D ${PARAVIEW_DATA_ROOT}
......@@ -205,6 +217,7 @@ if (PARAVIEW_USE_MPI AND VTK_MPIRUN_EXE AND NOT WIN32)
COMMAND ${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS}
${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS} ${VTK_MPI_PREFLAGS}
$<TARGET_FILE:pvbatch>
--enable-bt
--symmetric
${CMAKE_CURRENT_SOURCE_DIR}/TestMPI4PY.py)
set_tests_properties(TestMPI4PY-SymmetricBatch PROPERTIES LABELS "PARAVIEW")
......
......@@ -17,6 +17,7 @@ IF (PARAVIEW_DATA_ROOT)
ADD_TEST(NAME ${tfile}-Batch
COMMAND ${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 4 ${VTK_MPI_PREFLAGS}
$<TARGET_FILE:pvbatch>
--enable-bt
${CMAKE_CURRENT_SOURCE_DIR}/SurfaceLICTestDriver.py
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
......@@ -26,6 +27,7 @@ IF (PARAVIEW_DATA_ROOT)
# run the test serially
ADD_TEST(NAME ${tfile}-Batch
COMMAND $<TARGET_FILE:pvbatch>
--enable-bt
${CMAKE_CURRENT_SOURCE_DIR}/SurfaceLICTestDriver.py
-D ${PARAVIEW_DATA_ROOT}
-T ${ParaView_BINARY_DIR}/Testing/Temporary
......
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