mirror of
https://github.com/Unidata/netcdf-cxx4.git
synced 2024-11-21 03:13:46 +08:00
Added coveragte tests, other ctest-related configuration.
This commit is contained in:
parent
b1d7b8bdd8
commit
79083eb324
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*~
|
||||
build*
|
||||
build*
|
||||
CTestConfig.cmake
|
@ -218,11 +218,32 @@ IF(BUILD_SHARED_LIBS)
|
||||
ENDIF()
|
||||
|
||||
OPTION(NCXX_ENABLE_TESTS "Enable tests. Run with 'make test'." ON)
|
||||
IF(NCXX_ENABLE_TESTS)
|
||||
# Options for CTest-based tests, dashboards.
|
||||
SET(NCXX_CTEST_PROJECT_NAME "netcdf-cxx4" CACHE STRING "Project Name for CTest-based testing purposes.")
|
||||
SET(NCXX_CTEST_DROP_SITE "my.cdash.org" CACHE STRING "Dashboard location for CTest-based testing purposes.")
|
||||
SET(NCXX_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.")
|
||||
|
||||
# Options for CTest-based tests, dashboards.
|
||||
SET(NCXX_CTEST_PROJECT_NAME "netcdf-cxx4" CACHE STRING "Project Name for CTest-based testing purposes.")
|
||||
SET(NCXX_CTEST_DROP_SITE "my.cdash.org" CACHE STRING "Dashboard location for CTest-based testing purposes.")
|
||||
SET(NCXX_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.")
|
||||
FIND_PROGRAM(HOSTNAME_CMD NAMES hostname)
|
||||
IF(NOT MSVC)
|
||||
SET(HOSTNAME_ARG "-s")
|
||||
ENDIF()
|
||||
IF(HOSTNAME_CMD)
|
||||
EXEC_PROGRAM(${HOSTNAME_CMD} ARGS "${HOSTNAME_ARG}" OUTPUT_VARIABLE HOSTNAME)
|
||||
SET(NCXX_CTEST_SITE "${HOSTNAME}" CACHE STRING "Hostname of test machine.")
|
||||
ENDIF()
|
||||
|
||||
IF(NCXX_CTEST_SITE)
|
||||
SET(SITE "${NCXX_CTEST_SITE}" CACHE STRING "")
|
||||
ENDIF()
|
||||
|
||||
# Create a CTestConfig file from the template.
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/CTestConfig.cmake.in"
|
||||
"${CMAKE_SOURCE_DIR}/CTestConfig.cmake"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
ENDIF()
|
||||
|
||||
##
|
||||
# Mark some options as advanced.
|
||||
|
18
CTestConfig.cmake.in
Normal file
18
CTestConfig.cmake.in
Normal file
@ -0,0 +1,18 @@
|
||||
## 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 submit to the CDash dashboard:
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(CTest)
|
||||
|
||||
set(DART_TESTING_TIMEOUT "4800")
|
||||
|
||||
set(CTEST_PROJECT_NAME "@NCXX_CTEST_PROJECT_NAME@")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 MDT")
|
||||
SET(CTEST_SITE "@NCXX_CTEST_SITE@")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "@NCXX_CTEST_DROP_SITE@")
|
||||
set(CTEST_DROP_LOCATION "@NCXX_CTEST_DROP_LOC_PREFIX@/submit.php?project=@NCXX_CTEST_PROJECT_NAME@")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
Loading…
Reference in New Issue
Block a user