summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-01 12:26:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-05-01 12:26:29 (GMT)
commitd1d1d4134dc2f6b84aba7b3cfe3bc83364859603 (patch)
treeb1ccd7c21165a62082cc4f2aff949319b383533f
parentfe23c03567f44e4ec63be64da49b6e7e2d449418 (diff)
parent4f2fa2459a6918846a915099a16d081854b0a846 (diff)
downloadCMake-d1d1d4134dc2f6b84aba7b3cfe3bc83364859603.zip
CMake-d1d1d4134dc2f6b84aba7b3cfe3bc83364859603.tar.gz
CMake-d1d1d4134dc2f6b84aba7b3cfe3bc83364859603.tar.bz2
Merge topic 'ctest-nightly-start-time'
4f2fa2459a Tests: Add tests to demonstrate when CTEST_NIGHTLY_START_TIME is needed c1397ace1d Help: Clarify why CTEST_NIGHTLY_START_TIME is needed Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4688
-rw-r--r--Help/variable/CTEST_NIGHTLY_START_TIME.rst8
-rw-r--r--Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt1
-rw-r--r--Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt4
-rw-r--r--Tests/RunCMake/ctest_start/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/ctest_start/test.cmake.in4
5 files changed, 16 insertions, 3 deletions
diff --git a/Help/variable/CTEST_NIGHTLY_START_TIME.rst b/Help/variable/CTEST_NIGHTLY_START_TIME.rst
index bc80276..90841f9 100644
--- a/Help/variable/CTEST_NIGHTLY_START_TIME.rst
+++ b/Help/variable/CTEST_NIGHTLY_START_TIME.rst
@@ -1,5 +1,9 @@
CTEST_NIGHTLY_START_TIME
------------------------
-Specify the CTest ``NightlyStartTime`` setting
-in a :manual:`ctest(1)` dashboard client script.
+Specify the CTest ``NightlyStartTime`` setting in a :manual:`ctest(1)`
+dashboard client script.
+
+Note that this variable must always be set for a nightly build in a
+dashboard script. It is needed so that nightly builds can be properly grouped
+together in CDash.
diff --git a/Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt b/Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt b/Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt
new file mode 100644
index 0000000..79756eb
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt
@@ -0,0 +1,4 @@
+^WARNING: No nightly start time found please set in CTestConfig\.cmake or DartConfig\.cmake
+CMake Error at [^
+]*/Tests/RunCMake/ctest_start/NoStartTimeNightly/test\.cmake:[0-9]+ \(ctest_start\):
+ ctest_start unknown error\.$
diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
index da85b39..f11f1ec 100644
--- a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
@@ -48,6 +48,8 @@ run_ctest_start(TooManyArgs Experimental
${RunCMake_BINARY_DIR}/TooManyArgs-build
${RunCMake_BINARY_DIR}/TooManyArgs-build
${RunCMake_BINARY_DIR}/TooManyArgs-build)
+run_ctest_start(NoStartTimeExperimental Experimental)
+run_ctest_start(NoStartTimeNightly Nightly)
function(run_ConfigInBuild)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ConfigInBuild-build)
diff --git a/Tests/RunCMake/ctest_start/test.cmake.in b/Tests/RunCMake/ctest_start/test.cmake.in
index 8cd3cff..4063ece 100644
--- a/Tests/RunCMake/ctest_start/test.cmake.in
+++ b/Tests/RunCMake/ctest_start/test.cmake.in
@@ -8,7 +8,9 @@ set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
+if(NOT "@CASE_NAME@" MATCHES "^NoStartTime")
+ set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
+endif()
function(setup_tests)
ctest_start(${ctest_start_args})