1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 02:17:27 +08:00

Add option to skip CMake tests that need network access

This commit is contained in:
Brad King
2019-08-22 15:21:06 -04:00
parent 4b8a864d52
commit ed294c1664
2 changed files with 13 additions and 11 deletions

View File

@@ -677,7 +677,7 @@ endif()
# to a cdash4simpletest database. In these cases, the CDash dashboards # to a cdash4simpletest database. In these cases, the CDash dashboards
# should be run first. # should be run first.
# #
if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x" AND NOT CMake_TEST_NO_NETWORK)
set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org") set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org")
endif() endif()

View File

@@ -2619,16 +2619,18 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
PASS_REGULAR_EXPRESSION "Could not find executable" PASS_REGULAR_EXPRESSION "Could not find executable"
FAIL_REGULAR_EXPRESSION "SegFault") FAIL_REGULAR_EXPRESSION "SegFault")
configure_file( if(NOT CMake_TEST_NO_NETWORK)
"${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in" configure_file(
"${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in"
@ONLY ESCAPE_QUOTES) "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake"
add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND} @ONLY ESCAPE_QUOTES)
-S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND}
--output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log" -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V
) --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log"
set_tests_properties(CTestTestUpload PROPERTIES )
PASS_REGULAR_EXPRESSION "Upload\\.xml") set_tests_properties(CTestTestUpload PROPERTIES
PASS_REGULAR_EXPRESSION "Upload\\.xml")
endif()
configure_file( configure_file(
"${CMake_SOURCE_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake.in" "${CMake_SOURCE_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake.in"