summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-11-30 21:08:11 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-11-30 21:08:11 (GMT)
commita52c0118d454ea9ec93a05be8be552d587467813 (patch)
treead6db52bca2066c2fbd9ad553a53a646cbe82cc5 /Source/cmCTest.cxx
parentb21f1eaeae274589945c4e2e3e77a7b39305ac0d (diff)
downloadCMake-a52c0118d454ea9ec93a05be8be552d587467813.zip
CMake-a52c0118d454ea9ec93a05be8be552d587467813.tar.gz
CMake-a52c0118d454ea9ec93a05be8be552d587467813.tar.bz2
Added the --timeout option to ctest command line. This sets a global timeout on all tests if no more specific timeout is set on them.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 59003be..ee249b2 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -224,6 +224,7 @@ cmCTest::cmCTest()
this->MaxTestNameWidth = 30;
this->InteractiveDebugMode = true;
this->TimeOut = 0;
+ this->GlobalTimeout = 0;
this->CompressXMLFiles = false;
this->CTestConfigFile = "";
this->ScheduleType = "";
@@ -1702,6 +1703,13 @@ void cmCTest::HandleCommandLineArguments(size_t &i,
int plevel = atoi(arg.substr(2).c_str());
this->SetParallelLevel(plevel);
}
+
+ if(this->CheckArgument(arg, "--timeout") && i < args.size() - 1)
+ {
+ i++;
+ double timeout = (double)atof(args[i].c_str());
+ this->GlobalTimeout = timeout;
+ }
if(this->CheckArgument(arg, "-C", "--build-config") &&
i < args.size() - 1)
@@ -2760,4 +2768,3 @@ void cmCTest::OutputTestErrors(std::vector<char> const &process_output)
}
cmCTestLog(this, HANDLER_OUTPUT, test_outputs << std::endl << std::flush);
}
-