Merge topic 'deterministic-CTest-tests'

b5b20d20 ctest: Treat ENV{CTEST_OUTPUT_ON_FAILURE} as a boolean
fcf9cf6c Tests: Make a CTest test deterministic.
This commit is contained in:
Brad King 2015-04-23 09:04:33 -04:00 committed by CMake Topic Stage
commit 195a724c57
2 changed files with 5 additions and 2 deletions

View File

@ -332,9 +332,9 @@ cmCTest::cmCTest()
this->ComputedCompressMemCheckOutput = false; this->ComputedCompressMemCheckOutput = false;
this->RepeatTests = 1; // default to run each test once this->RepeatTests = 1; // default to run each test once
this->RepeatUntilFail = false; this->RepeatUntilFail = false;
if(cmSystemTools::GetEnv("CTEST_OUTPUT_ON_FAILURE")) if(const char* outOnFail = cmSystemTools::GetEnv("CTEST_OUTPUT_ON_FAILURE"))
{ {
this->OutputTestOutputOnTestFailure = true; this->OutputTestOutputOnTestFailure = !cmSystemTools::IsOff(outOnFail);
} }
this->InitStreams(); this->InitStreams();

View File

@ -1,5 +1,8 @@
include(RunCMake) include(RunCMake)
unset(ENV{CTEST_PARALLEL_LEVEL})
unset(ENV{CTEST_OUTPUT_ON_FAILURE})
run_cmake_command(repeat-until-fail-bad1 run_cmake_command(repeat-until-fail-bad1
${CMAKE_CTEST_COMMAND} --repeat-until-fail ${CMAKE_CTEST_COMMAND} --repeat-until-fail
) )