summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-23 13:04:33 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-23 13:04:33 (GMT)
commit195a724c57bfe13f286525e0f8a7f2578768c77e (patch)
tree7dbf427b01f1c843fdf0675ef1274879f4c5e46b
parentb229f40f0775a89571adc53c8174762dbe6ad0a6 (diff)
parentb5b20d2050616b186cf5b676bbb15772a347ffdd (diff)
downloadCMake-195a724c57bfe13f286525e0f8a7f2578768c77e.zip
CMake-195a724c57bfe13f286525e0f8a7f2578768c77e.tar.gz
CMake-195a724c57bfe13f286525e0f8a7f2578768c77e.tar.bz2
Merge topic 'deterministic-CTest-tests'
b5b20d20 ctest: Treat ENV{CTEST_OUTPUT_ON_FAILURE} as a boolean fcf9cf6c Tests: Make a CTest test deterministic.
-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
)