Commit 0be023b8 authored by loring's avatar loring

Added copyright blocks to testing related CMake

files. Escape regex escape from CMake. Disable
slivr ctest that had no executable. Added a
directory for ctests and a test to reports
dashboard system capabilities. Disable testing
by default.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22153 18c085ea-50e0-402c-830e-de6fd14e8384
parent dacb9383
......@@ -814,12 +814,18 @@ VISIT_INSTALLED_VERSION_ARCHIVES
VISIT_INSTALLED_VERSION_INCLUDE
)
# Setup regression testing
# Setup native regression testing
# deafult to off until things are
# settled down
SET(BUILD_TESTING OFF CACHE BOOL "Build testing tree")
INCLUDE(CTest)
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake"
@ONLY)
IF(BUILD_TESTING)
SUBDIRS(tests)
ENDIF()
MACRO(VISIT_INSTALL_TARGETS_RELATIVE dest_dir)
IF(VISIT_STATIC)
......@@ -1333,7 +1339,7 @@ IF(VISIT_PARALLEL)
IF(WIN32)
SET(VPFLAGS "PARALLEL MPICH_IGNORE_CXX_SEEK OMPI_SKIP_MPICXX")
ELSE(WIN32)
SET(VPFLAGS "-DPARALLEL -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX")
SET(VPFLAGS "-DPARALLEL -DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX")
ENDIF(WIN32)
IF(VISIT_MPI_COMPILER)
MESSAGE(STATUS "Setting up MPI using compiler wrapper")
......
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
#*****************************************************************************
#
# Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
# Produced at the Lawrence Livermore National Laboratory
# LLNL-CODE-442911
# All rights reserved.
#
# This file is part of VisIt. For details, see https://visit.llnl.gov/. The
# full copyright notice is contained in the file COPYRIGHT located at the root
# of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the disclaimer below.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the disclaimer (as noted below) in the
# documentation and/or other materials provided with the distribution.
# - Neither the name of the LLNS/LLNL nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
# LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
#*****************************************************************************
set(CTEST_PROJECT_NAME "VisIt")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=VisIt")
......
#*****************************************************************************
#
# Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
# Produced at the Lawrence Livermore National Laboratory
# LLNL-CODE-442911
# All rights reserved.
#
# This file is part of VisIt. For details, see https://visit.llnl.gov/. The
# full copyright notice is contained in the file COPYRIGHT located at the root
# of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the disclaimer below.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the disclaimer (as noted below) in the
# documentation and/or other materials provided with the distribution.
# - Neither the name of the LLNS/LLNL nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
# LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
#*****************************************************************************
SET(CTEST_CUSTOM_WARNING_MATCH
${CTEST_CUSTOM_WARNING_MATCH}
"{standard input}:[0-9][0-9]*: [wW]arning: "
......@@ -19,7 +56,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
"clang: warning: unknown warning option"
":[0-9][0-9]*: note: "
"[0-9][0-9]* warnings? generated"
"Xcode\.app"
"Xcode\\.app"
)
# until some of the reported issues get fixed
......
#*****************************************************************************
#
# Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
# Produced at the Lawrence Livermore National Laboratory
# LLNL-CODE-442911
# All rights reserved.
#
# This file is part of VisIt. For details, see https://visit.llnl.gov/. The
# full copyright notice is contained in the file COPYRIGHT located at the root
# of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the disclaimer below.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the disclaimer (as noted below) in the
# documentation and/or other materials provided with the distribution.
# - Neither the name of the LLNS/LLNL nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
# LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
#*****************************************************************************
IF(VISIT_PARALLEL)
ADD_PARALLEL_EXECUTABLE(
TestSystemCaps
MACOSX_BUNDLE TestSystemCaps.C
)
SET_PROPERTY(
SOURCE TestSystemCaps.C APPEND
PROPERTY COMPILE_DEFINITIONS TEST_MPI_CAPS
)
ELSE()
ADD_EXECUTABLE(
TestSystemCaps
MACOSX_BUNDLE TestSystemCaps.C
)
ENDIF()
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(
TestSystemCaps LINK_PRIVATE
vtkRenderingOpenGL ${OPENGL_gl_LIBRARY}
)
ADD_TEST(NAME TestSystemCaps COMMAND TestSystemCaps)
IF(VISIT_PYTHON_SCRIPTING)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
SET_PROPERTY(
SOURCE TestSystemCaps.C APPEND
PROPERTY COMPILE_DEFINITIONS TEST_PY_CAPS
)
ENDIF()
#define vtkRenderingCore_AUTOINIT 1(vtkRenderingOpenGL)
#include "vtkSetGet.h"
#include "vtkRenderWindow.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkgl.h" // until VTK 6.1
//#include "vtkOpenGLExtensionManager.h"
#if defined(TEST_MPI_CAPS)
# include "mpi.h"
#endif
#if defined(TEST_PY_CAPS)
# include "patchlevel.h"
#endif
#include <vtksys/SystemInformation.hxx>
#include <string>
#include <sstream>
using std::string;
using std::ostringstream;
// Description:
// Get python version
#if defined(TEST_PY_CAPS)
string GetPythonVersion()
{
ostringstream oss;
#if defined(PY_VERSION)
oss << PY_VERSION;
#else
oss << "unknown";
#endif
return oss.str();
}
#endif
// Description:
// Get the version of the standard implemented by this
// MPI
#if defined(TEST_MPI_CAPS)
string GetMPIVersion()
{
ostringstream oss;
int major=-1, minor=-1;
#if defined(MPI_VERSION)
major = MPI_VERSION;
#endif
#if defined(MPI_SUBVERSION)
minor = MPI_SUBVERSION;
#endif
//MPI_Get_version(&major, &minor);
oss << major << "." << minor;
return oss.str();
}
#endif
// Description:
// Get the implementor name and release info
#if defined(TEST_MPI_CAPS)
string GetMPILibraryVersion()
{
ostringstream oss;
#if defined(MPI_VERSION) && (MPI_VERSION >= 3)
char libVer[MPI_MAX_LIBRARY_VERSION_STRING] = {'\0'};
int libVerLen = MPI_MAX_LIBRARY_VERSION_STRING;
MPI_Get_library_version(libVer, &libVerLen);
libVer[libVerLen] = '\0';
oss << libVer;
#else
// Open MPI
#if defined(OPEN_MPI)
oss << "Open MPI";
#if defined(OMPI_MAJOR_VERSION)
oss << " " << OMPI_MAJOR_VERSION;
#endif
#if defined(OMPI_MINOR_VERSION)
oss << "." << OMPI_MINOR_VERSION;
#endif
#if defined(OMPI_RELEASE_VERSION)
oss << "." << OMPI_RELEASE_VERSION;
#endif
// MPICH
#elif defined(MPICH2)
oss << "MPICH2";
#if defined(MPICH2_VERSION)
oss << " " << MPICH2_VERSION;
#endif
#elif defined(MSMPI_VER)
oss << "Microsoft MPI " << MSMPI_VER;
#else
oss << "unknown";
#endif
#endif
return oss.str();
}
#endif
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
// for 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;
}
/* VTK 6.1 only
vtkOpenGLExtensionManager *extensions = context->GetExtensionManager();
Until VTK 6.1 need to do this*/
const char *oglVersion
= reinterpret_cast<const char *>(glGetString(GL_VERSION));
const char *oglVendor
= reinterpret_cast<const char *>(glGetString(GL_VENDOR));
const char *oglRenderer
= reinterpret_cast<const char *>(glGetString(GL_RENDERER));
const char *oglExtensions
= reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
oglVersion = oglVersion ? oglVersion : "NULL";
oglVendor = oglVendor ? oglVendor : "NULL";
oglRenderer = oglRenderer ? oglRenderer : "NULL";
oglExtensions = oglExtensions ? oglExtensions : "NULL";
// for 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 = " << GetMPIVersion() << endl
<< "Library = " << GetMPILibraryVersion() << endl
<< endl
#endif
#if defined(TEST_PY_CAPS)
<< "Python:" << endl
<< "Version = " << GetPythonVersion() << endl
<< endl
#endif
<< "OpenGL:" << endl
/* VTK 6.1 only
<< "DriverGLVersion = " << extensions->GetDriverGLVersion() << endl
<< "DriverGLVendor = " << extensions->GetDriverGLVendor() << endl
<< "DriverGLRenderer = " << extensions->GetDriverGLRenderer() << endl
<< "Extensions = " << extensions->GetExtensionsString() << endl */
<< "DriverGLVendor = " << oglVersion << endl
<< "DriverGLVersion = " << oglVendor << endl
<< "DriverGLRenderer = " << oglRenderer << endl
<< "Extensions = " << oglExtensions << endl
<< endl;
rwin->Delete();
// always pass
return 0;
}
......@@ -27,7 +27,7 @@ ENDMACRO(CREATE_EXEC)
#CREATE_EXEC(pprobe pprobe.c ten)
#CREATE_EXEC(spots spots.c alan)
IF(BUILD_TESTING)
ADD_TEST(nrrd.Sanity ${EXECUTABLE_OUTPUT_DIRECTORY}/nrrdSanity)
ENDIF(BUILD_TESTING)
#IF(BUILD_TESTING)
# ADD_EXECUTABLE(nrrdSanity MACOSX_BUNDLE nrrdSanity.c)
# ADD_TEST(nrrdSanity COMMAND nrrdSanity)
#ENDIF(BUILD_TESTING)
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