diff options
author | Brad King <brad.king@kitware.com> | 2015-04-22 12:27:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-22 12:27:19 (GMT) |
commit | b5b20d2050616b186cf5b676bbb15772a347ffdd (patch) | |
tree | 6c47150d0aec8935ba1c9aa90f51d6e711a20fae /Source/cmCTest.cxx | |
parent | fcf9cf6cd8a8299100c571afbacc134932552bb6 (diff) | |
download | CMake-b5b20d2050616b186cf5b676bbb15772a347ffdd.zip CMake-b5b20d2050616b186cf5b676bbb15772a347ffdd.tar.gz CMake-b5b20d2050616b186cf5b676bbb15772a347ffdd.tar.bz2 |
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).
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 4 |
1 files 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(); |