From b5b20d2050616b186cf5b676bbb15772a347ffdd Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 22 Apr 2015 08:27:19 -0400 Subject: ctest: Treat ENV{CTEST_OUTPUT_ON_FAILURE} as a boolean Having this variable in the environment should not be enough to activate the behavior. It must also not be set to a false value (or empty value). --- Source/cmCTest.cxx | 4 ++-- 1 file changed, 2 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(); -- cgit v0.12