summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2010-08-31 14:41:23 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2010-08-31 14:41:23 (GMT)
commit32242affea45eb3c3ffa2691657e970eaac49799 (patch)
tree6d75ae8b204aac75d8b8baae644e14f4f88557e5 /Source/CTest/cmCTestTestHandler.cxx
parentaac1680648634a87dd4eee3ae603aef387798244 (diff)
downloadCMake-32242affea45eb3c3ffa2691657e970eaac49799.zip
CMake-32242affea45eb3c3ffa2691657e970eaac49799.tar.gz
CMake-32242affea45eb3c3ffa2691657e970eaac49799.tar.bz2
Added CTest command --print-labels
This command allows a user to quickly see the list of all available test labels. The labels are also printed in verbose show only mode, alongside their corresponding tests.
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index a4a4863..6dd348d 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -567,7 +567,7 @@ int cmCTestTestHandler::ProcessHandler()
if (total == 0)
{
- if ( !this->CTest->GetShowOnly() )
+ if ( !this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels() )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "No tests were found!!!"
<< std::endl);
@@ -1079,7 +1079,12 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
parallel->SetPassFailVectors(&passed, &failed);
this->TestResults.clear();
parallel->SetTestResults(&this->TestResults);
- if(this->CTest->GetShowOnly())
+
+ if(this->CTest->ShouldPrintLabels())
+ {
+ parallel->PrintLabels();
+ }
+ else if(this->CTest->GetShowOnly())
{
parallel->PrintTestList();
}