Commit 82e40607 authored by Brad King's avatar Brad King
Browse files

ctest: Display test "WAITING" messages only in extra-verbose mode

These messages are incidental scheduling output.  Avoid cluttering
the normal verbose output showing tests starting and finishing.
parent 80da23f2
......@@ -587,24 +587,24 @@ void cmCTestMultiProcessHandler::StartNextTests()
onlyRunSerialTestsLeft = false;
}
}
cmCTestLog(this->CTest, HANDLER_OUTPUT, "***** WAITING, ");
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "***** WAITING, ");
if (this->SerialTestRunning) {
cmCTestLog(this->CTest, HANDLER_OUTPUT,
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Waiting for RUN_SERIAL test to finish.");
} else if (onlyRunSerialTestsLeft) {
cmCTestLog(this->CTest, HANDLER_OUTPUT,
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Only RUN_SERIAL tests remain, awaiting available slot.");
} else {
/* clang-format off */
cmCTestLog(this->CTest, HANDLER_OUTPUT,
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"System Load: " << systemLoad << ", "
"Max Allowed Load: " << this->TestLoad << ", "
"Smallest test " << testWithMinProcessors <<
" requires " << minProcessorsRequired);
/* clang-format on */
}
cmCTestLog(this->CTest, HANDLER_OUTPUT, "*****" << std::endl);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "*****" << std::endl);
// Wait between 1 and 5 seconds before trying again.
unsigned int milliseconds = (cmSystemTools::RandomSeed() % 5 + 1) * 1000;
......
......@@ -202,7 +202,7 @@ function(run_TestLoad name load)
add_test(TestLoad1 \"${CMAKE_COMMAND}\" -E echo \"test of --test-load\")
add_test(TestLoad2 \"${CMAKE_COMMAND}\" -E echo \"test of --test-load\")
")
run_cmake_command(${name} ${CMAKE_CTEST_COMMAND} -j2 --test-load ${load})
run_cmake_command(${name} ${CMAKE_CTEST_COMMAND} -VV -j2 --test-load ${load})
endfunction()
# Tests for the --test-load feature of ctest
......
^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
Test project [^
]*/Tests/RunCMake/CTestCommandLine/TestLoad(
[^*][^
]*)*
test 1
Start 1: TestLoad1
+(
[^*][^
]*)*
test 2
Start 2: TestLoad2
1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+(
[^*][^
]*)*
1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec(
[^*][^
]*)*
2/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 2
^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
Test project [^
]*/Tests/RunCMake/CTestCommandLine/TestLoad(
[^*][^
]*)*
test 1
Start 1: TestLoad1
+(
[^*][^
]*)*
test 2
Start 2: TestLoad2
1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+(
[^*][^
]*)*
1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec(
[^*][^
]*)*
2/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 2
^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
Test project [^
]*/Tests/RunCMake/CTestCommandLine/TestLoad(
[^*][^
]*)*
\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 3, Smallest test TestLoad[1-2] requires 1\*\*\*\*\*
test 1
Start 1: TestLoad1
+(
[^*][^
]*)*
test 2
Start 2: TestLoad2
1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+(
[^*][^
]*)*
1/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec(
[^*][^
]*)*
2/2 Test #[1-2]: TestLoad[1-2] ........................ Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 2
Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-build
Test project [^
]*/Tests/RunCMake/ctest_test/CTestTestLoadInvalid-build(
[^*][^
]*)*
test 1
Start 1: RunCMakeVersion
+(
[^*][^
]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
......
Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadPass-build
Test project [^
]*/Tests/RunCMake/ctest_test/CTestTestLoadPass-build(
[^*][^
]*)*
test 1
Start 1: RunCMakeVersion
+(
[^*][^
]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
......
Test project .*/Tests/RunCMake/ctest_test/CTestTestLoadWait-build
Test project [^
]*/Tests/RunCMake/ctest_test/CTestTestLoadWait-build(
[^*][^
]*)*
\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 4, Smallest test RunCMakeVersion requires 1\*\*\*\*\*
test 1
Start 1: RunCMakeVersion
+(
[^*][^
]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
......
......@@ -18,6 +18,7 @@ run_ctest_test(TestQuiet QUIET)
#
# Spoof a load average value to make these tests more reliable.
set(ENV{__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING} 5)
set(RunCTest_VERBOSE_FLAG -VV)
# Verify that new tests are started when the load average falls below
# our threshold.
......@@ -53,6 +54,7 @@ run_ctest_test(TestLoadOrder TEST_LOAD "ERR4")
unset(ENV{__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING})
unset(CASE_CTEST_TEST_LOAD)
unset(RunCTest_VERBOSE_FLAG)
function(run_TestChangeId)
set(CASE_TEST_PREFIX_CODE [[
......
Test project .*/Tests/RunCMake/ctest_test/TestLoadInvalid-build
Test project [^
]*/Tests/RunCMake/ctest_test/TestLoadInvalid-build(
[^*][^
]*)*
test 1
Start 1: RunCMakeVersion
+(
[^*][^
]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
......
Test project .*/Tests/RunCMake/ctest_test/TestLoadOrder-build
Test project [^
]*/Tests/RunCMake/ctest_test/TestLoadOrder-build(
[^*][^
]*)*
test 1
Start 1: RunCMakeVersion
+(
[^*][^
]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
......
Test project .*/Tests/RunCMake/ctest_test/TestLoadPass-build
Test project [^
]*/Tests/RunCMake/ctest_test/TestLoadPass-build(
[^*][^
]*)*
test 1
Start 1: RunCMakeVersion
+(
[^*][^
]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
......
Test project .*/Tests/RunCMake/ctest_test/TestLoadWait-build
Test project [^
]*/Tests/RunCMake/ctest_test/TestLoadWait-build(
[^*][^
]*)*
\*\*\*\*\* WAITING, System Load: 5, Max Allowed Load: 2, Smallest test RunCMakeVersion requires 1\*\*\*\*\*
test 1
Start 1: RunCMakeVersion
+(
[^*][^
]*)*
1/1 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+
100% tests passed, 0 tests failed out of 1
......
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