summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-24 13:36:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-24 13:37:02 (GMT)
commit0039ddb6f2a4604d90e15041aca8eb1b048063af (patch)
tree138788186a214bfe9aed4973b4f19b81c19f83f6 /Source
parent096c3bacea33a3a1192d065d88f9bc6c995846ee (diff)
parent3d1bd0111447909bec0582e8c0128a427a5eeaba (diff)
downloadCMake-0039ddb6f2a4604d90e15041aca8eb1b048063af.zip
CMake-0039ddb6f2a4604d90e15041aca8eb1b048063af.tar.gz
CMake-0039ddb6f2a4604d90e15041aca8eb1b048063af.tar.bz2
Merge topic 'ctest-minor-fixups'
3d1bd011 cmCTestTestHandler: use pointers to static memory 5969048d cmCTestTestCommand: defer getting the global timeout Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !735
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx3
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx8
2 files changed, 6 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index a756188..21b1003 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -33,10 +33,11 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
const char* ctestTimeout =
this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT");
- double timeout = this->CTest->GetTimeOut();
+ double timeout;
if (ctestTimeout) {
timeout = atof(ctestTimeout);
} else {
+ timeout = this->CTest->GetTimeOut();
if (timeout <= 0) {
// By default use timeout of 10 minutes
timeout = 600;
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index dafeec2..167fecf 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1633,10 +1633,10 @@ void cmCTestTestHandler::UseExcludeRegExp()
const char* cmCTestTestHandler::GetTestStatus(int status)
{
- static const char statuses[][100] = {
- "Not Run", "Timeout", "SEGFAULT", "ILLEGAL", "INTERRUPT",
- "NUMERICAL", "OTHER_FAULT", "Failed", "BAD_COMMAND", "Completed"
- };
+ static const char* statuses[] = { "Not Run", "Timeout", "SEGFAULT",
+ "ILLEGAL", "INTERRUPT", "NUMERICAL",
+ "OTHER_FAULT", "Failed", "BAD_COMMAND",
+ "Completed" };
if (status < cmCTestTestHandler::NOT_RUN ||
status > cmCTestTestHandler::COMPLETED) {