summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCTest.cxx4
-rw-r--r--Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake3
2 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 3697aa4..403a459 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 2e5156c..22a8d20 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
)