diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 3697aa4b2..403a45937 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -332,9 +332,9 @@ cmCTest::cmCTest() this->ComputedCompressMemCheckOutput = false; this->RepeatTests = 1; // default to run each test once 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(); diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 2e5156cd6..22a8d20f9 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -1,5 +1,8 @@ include(RunCMake) +unset(ENV{CTEST_PARALLEL_LEVEL}) +unset(ENV{CTEST_OUTPUT_ON_FAILURE}) + run_cmake_command(repeat-until-fail-bad1 ${CMAKE_CTEST_COMMAND} --repeat-until-fail )