summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx3
-rw-r--r--Source/CTest/cmCTestLaunch.cxx3
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx2
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx3
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx8
-rw-r--r--Source/CTest/cmParseDelphiCoverage.cxx3
6 files changed, 13 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 4d970d5..87c532c 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -2222,7 +2222,8 @@ void cmCTestCoverageHandler::LoadLabels(const char* dir)
if (line.empty() || line[0] == '#') {
// Ignore blank and comment lines.
continue;
- } else if (line[0] == ' ') {
+ }
+ if (line[0] == ' ') {
// Label lines appear indented by one space.
std::string label = line.substr(1);
int id = this->GetLabelId(label);
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 7195bb3..a782150 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -306,7 +306,8 @@ void cmCTestLaunch::LoadLabels()
if (line.empty() || line[0] == '#') {
// Ignore blank and comment lines.
continue;
- } else if (line[0] == ' ') {
+ }
+ if (line[0] == ' ') {
// Label lines appear indented by one space.
if (inTarget || inSource) {
this->Labels.insert(line.c_str() + 1);
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index d738a1b..fdc16b1 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -561,7 +561,7 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList()
// In parallel test runs repeatedly move dependencies of the tests on
// the current dependency level to the next level until no
// further dependencies exist.
- while (priorityStack.back().size()) {
+ while (!priorityStack.back().empty()) {
TestSet& previousSet = priorityStack.back();
priorityStack.push_back(TestSet());
TestSet& currentSet = priorityStack.back();
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 d3ec9a4..c24aecb 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1641,10 +1641,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) {
diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx
index 9ae48d8..9cdd50b 100644
--- a/Source/CTest/cmParseDelphiCoverage.cxx
+++ b/Source/CTest/cmParseDelphiCoverage.cxx
@@ -46,7 +46,8 @@ public:
beginSet.push_back("begin");
coverageVector.push_back(-1);
continue;
- } else if (line.find('{') != line.npos) {
+ }
+ if (line.find('{') != line.npos) {
blockComFlag = true;
} else if (line.find('}') != line.npos) {
blockComFlag = false;