summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorJohnny Jazeix <jazeix@gmail.com>2020-04-20 21:05:15 (GMT)
committerJohnny Jazeix <jazeix@gmail.com>2020-04-20 21:05:15 (GMT)
commite89aeba5c4733964db15e0d147e063af34205d54 (patch)
tree2b5e1da00d132d9e60b8355f6de72427b44faa62 /Source/cmCTest.cxx
parentdf2d39bc512bd09ae808e8a2a6c7523737bb26c0 (diff)
downloadCMake-e89aeba5c4733964db15e0d147e063af34205d54.zip
CMake-e89aeba5c4733964db15e0d147e063af34205d54.tar.gz
CMake-e89aeba5c4733964db15e0d147e063af34205d54.tar.bz2
ctest: add option --stop-on-failure
To stop the tests once one has failed Fixes: #16628
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 35a8952..c2b2a09 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -92,6 +92,7 @@ struct cmCTest::Private
std::string ConfigType;
std::string ScheduleType;
std::chrono::system_clock::time_point StopTime;
+ bool StopOnFailure = false;
bool TestProgressOutput = false;
bool Verbose = false;
bool ExtraVerbose = false;
@@ -1932,6 +1933,10 @@ bool cmCTest::HandleCommandLineArguments(size_t& i,
this->SetStopTime(args[i]);
}
+ else if (this->CheckArgument(arg, "--stop-on-failure"_s)) {
+ this->Impl->StopOnFailure = true;
+ }
+
else if (this->CheckArgument(arg, "-C"_s, "--build-config") &&
i < args.size() - 1) {
i++;
@@ -2493,6 +2498,16 @@ void cmCTest::SetNotesFiles(const char* notes)
this->Impl->NotesFiles = notes;
}
+bool cmCTest::GetStopOnFailure() const
+{
+ return this->Impl->StopOnFailure;
+}
+
+void cmCTest::SetStopOnFailure(bool stop)
+{
+ this->Impl->StopOnFailure = stop;
+}
+
std::chrono::system_clock::time_point cmCTest::GetStopTime() const
{
return this->Impl->StopTime;