summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-08-28 15:08:39 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-08-28 15:08:39 (GMT)
commitb427d1985e76f1e3362056107670aba2a223346d (patch)
tree8a5cc05f08e23252f493f9f4d11f995e7f7713f5 /Source/CTest/cmCTestTestHandler.cxx
parent00ca78108801277b95a59b519ac9b8cd43f1227a (diff)
downloadCMake-b427d1985e76f1e3362056107670aba2a223346d.zip
CMake-b427d1985e76f1e3362056107670aba2a223346d.tar.gz
CMake-b427d1985e76f1e3362056107670aba2a223346d.tar.bz2
Added ctest -N test. Fixed ctest working directory bug. MemCheck fix coming soon...
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx40
1 files changed, 8 insertions, 32 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b51b7c5..f2e917a 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1304,41 +1304,11 @@ bool cmCTestTestHandler::GetValue(const char* tag,
}
//---------------------------------------------------------------------
-void cmCTestTestHandler::PrintTestList()
-{
- int total = this->TotalNumberOfTests;
- for (ListOfTests::iterator it = this->TestList.begin();
- it != this->TestList.end(); it ++ )
- {
- cmCTestTestProperties& p = *it;
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3)
- << p.Index << "/");
- cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3)
- << total << " ");
- if (this->MemCheck)
- {
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "Memory Check");
- }
- else
- {
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "Testing");
- }
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
- cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
- }
-}
-
-//---------------------------------------------------------------------
void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
std::vector<cmStdString> &failed)
{
this->ComputeTestList();
- if(this->CTest->GetShowOnly())
- {
- this->PrintTestList();
- return;
- }
cmCTestMultiProcessHandler parallel;
parallel.SetCTest(this->CTest);
parallel.SetParallelLevel(this->CTest->GetParallelLevel());
@@ -1380,8 +1350,14 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
parallel.SetPassFailVectors(&passed, &failed);
this->TestResults.clear();
parallel.SetTestResults(&this->TestResults);
- parallel.RunTests();
-
+ if(this->CTest->GetShowOnly())
+ {
+ parallel.PrintTestList();
+ }
+ else
+ {
+ parallel.RunTests();
+ }
*this->LogFile << "End testing: "
<< this->CTest->CurrentTime() << std::endl;
}