summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-06-24 09:33:32 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-06-24 09:46:55 (GMT)
commit24ba0fd078ca1db13cdbeb51e531b0fce53f3f3f (patch)
tree910a7aae614c8f3a596e14a5c7f7ce729dbcc1b0 /Source/cmCTest.cxx
parent03022877399735b930ae44f1fd2d19d64e4a8a2f (diff)
downloadCMake-24ba0fd078ca1db13cdbeb51e531b0fce53f3f3f.zip
CMake-24ba0fd078ca1db13cdbeb51e531b0fce53f3f3f.tar.gz
CMake-24ba0fd078ca1db13cdbeb51e531b0fce53f3f3f.tar.bz2
CTest: Refactor error output into ErrorMessageUnknownDashDValue
No behavior change. Prep work for defining script variables by extending -D command line handling to recognize var:type=value syntax.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx47
1 files changed, 23 insertions, 24 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 4aff64b..689f6ab 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1944,29 +1944,6 @@ bool cmCTest::AddTestsForDashboardType(std::string &targ)
}
else
{
- cmCTestLog(this, ERROR_MESSAGE,
- "CTest -D called with incorrect option: "
- << targ << std::endl);
- cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
- << " " << "ctest" << " -D Continuous" << std::endl
- << " " << "ctest"
- << " -D Continuous(Start|Update|Configure|Build)" << std::endl
- << " " << "ctest"
- << " -D Continuous(Test|Coverage|MemCheck|Submit)"
- << std::endl
- << " " << "ctest" << " -D Experimental" << std::endl
- << " " << "ctest"
- << " -D Experimental(Start|Update|Configure|Build)"
- << std::endl
- << " " << "ctest"
- << " -D Experimental(Test|Coverage|MemCheck|Submit)"
- << std::endl
- << " " << "ctest" << " -D Nightly" << std::endl
- << " " << "ctest"
- << " -D Nightly(Start|Update|Configure|Build)" << std::endl
- << " " << "ctest"
- << " -D Nightly(Test|Coverage|MemCheck|Submit)" << std::endl
- << " " << "ctest" << " -D NightlyMemoryCheck" << std::endl);
return false;
}
return true;
@@ -1974,6 +1951,27 @@ bool cmCTest::AddTestsForDashboardType(std::string &targ)
//----------------------------------------------------------------------
+void cmCTest::ErrorMessageUnknownDashDValue(std::string &val)
+{
+ cmCTestLog(this, ERROR_MESSAGE,
+ "CTest -D called with incorrect option: " << val << std::endl);
+
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Available options are:" << std::endl
+ << " ctest -D Continuous" << std::endl
+ << " ctest -D Continuous(Start|Update|Configure|Build)" << std::endl
+ << " ctest -D Continuous(Test|Coverage|MemCheck|Submit)" << std::endl
+ << " ctest -D Experimental" << std::endl
+ << " ctest -D Experimental(Start|Update|Configure|Build)" << std::endl
+ << " ctest -D Experimental(Test|Coverage|MemCheck|Submit)" << std::endl
+ << " ctest -D Nightly" << std::endl
+ << " ctest -D Nightly(Start|Update|Configure|Build)" << std::endl
+ << " ctest -D Nightly(Test|Coverage|MemCheck|Submit)" << std::endl
+ << " ctest -D NightlyMemoryCheck" << std::endl);
+}
+
+
+//----------------------------------------------------------------------
bool cmCTest::CheckArgument(const std::string& arg, const char* varg1,
const char* varg2)
{
@@ -2263,10 +2261,11 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
this->ProduceXML = true;
i++;
std::string targ = args[i];
- // AddTestsForDashboard parses the dashborad type and converts it
+ // AddTestsForDashboard parses the dashboard type and converts it
// into the separate stages
if (!this->AddTestsForDashboardType(targ))
{
+ this->ErrorMessageUnknownDashDValue(targ);
performSomeTest = false;
}
}