diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2013-09-24 18:20:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-08 13:18:13 (GMT) |
commit | eb2decc02d28f41a3e189d5387be24552c42060f (patch) | |
tree | f1995da8fc935d3ed8831213da02534eab5e7ce2 /Source/cmCTest.cxx | |
parent | 475635ec0f3eeae9f6db0f9daa8a9c4cd8b3f989 (diff) | |
download | CMake-eb2decc02d28f41a3e189d5387be24552c42060f.zip CMake-eb2decc02d28f41a3e189d5387be24552c42060f.tar.gz CMake-eb2decc02d28f41a3e189d5387be24552c42060f.tar.bz2 |
ctest: Add --rerun-failed option
Add a new command line argument to ctest. This allows users to
rerun tests that failed during the previous call to ctest. This
is accomplished by analyzing the most recently modified file named
"^LastTestsFailed*" in the Testing/Temporary subdirectory of the
project's binary directory.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 14e1f50..feae61a 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2187,6 +2187,12 @@ void cmCTest::HandleCommandLineArguments(size_t &i, this->GetHandler("memcheck")-> SetPersistentOption("ExcludeRegularExpression", args[i].c_str()); } + + if(this->CheckArgument(arg, "--rerun-failed")) + { + this->GetHandler("test")->SetPersistentOption("RerunFailed", "true"); + this->GetHandler("memcheck")->SetPersistentOption("RerunFailed", "true"); + } } //---------------------------------------------------------------------- |