summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-10-09 20:11:47 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-10-09 20:11:47 (GMT)
commitebd0c2d3771835a1317c1fd70eafd3ebf2135b01 (patch)
tree1dc8f5805b5f3f01933bc0035b3b6cad7b04b73a /Source/CTest
parentf9687e328f7ea64ea6384aae11af36fdd3a12643 (diff)
downloadCMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.zip
CMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.tar.gz
CMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.tar.bz2
Merge in changes for RC 3
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx4
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx7
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx7
-rw-r--r--Source/CTest/cmCTestRunTest.cxx6
-rw-r--r--Source/CTest/cmCTestRunTest.h2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx12
6 files changed, 19 insertions, 19 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index d93da07..0095bbc 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -596,8 +596,8 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(std::ostream& os)
std::vector<cmCTestBuildErrorWarning>::iterator it;
// only report the first 50 warnings and first 50 errors
- unsigned short numErrorsAllowed = this->MaxErrors;
- unsigned short numWarningsAllowed = this->MaxWarnings;
+ int numErrorsAllowed = this->MaxErrors;
+ int numWarningsAllowed = this->MaxWarnings;
std::string srcdir = this->CTest->GetCTestConfiguration("SourceDirectory");
// make sure the source dir is in the correct case on windows
// via a call to collapse full path.
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index b6e10bf..c2135aa 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -361,9 +361,6 @@ int cmCTestCoverageHandler::ProcessHandler()
cmSystemTools::ConvertToUnixSlashes(sourceDir);
cmSystemTools::ConvertToUnixSlashes(binaryDir);
- std::string asfGlob = sourceDir + "/*";
- std::string abfGlob = binaryDir + "/*";
-
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Performing coverage" << std::endl);
cmCTestCoverageHandlerContainer cont;
@@ -1590,13 +1587,13 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
std::string shortFileName =
this->CTest->GetShortPathToFile(file.c_str());
- float cper = percentBranch + percentFunction;
+ float cper = static_cast<float>(percentBranch + percentFunction);
if(totalBranches > 0)
{
cper /= 2.0f;
}
percent_coverage += cper;
- float cmet = percentFunction + percentBranch;
+ float cmet = static_cast<float>(percentFunction + percentBranch);
if(totalBranches > 0)
{
cmet /= 2.0f;
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 7ab9cac..63dfe7e 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -81,7 +81,7 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
cmCTestRunTest* testRun = new cmCTestRunTest(this->TestHandler);
testRun->SetIndex(test);
testRun->SetTestProperties(this->Properties[test]);
- if(testRun->StartTest())
+ if(testRun->StartTest(this->Total))
{
this->RunningTests.insert(testRun);
}
@@ -251,7 +251,8 @@ bool cmCTestMultiProcessHandler::CheckOutput()
this->TestRunningMap[test] = false;
this->RunningTests.erase(p);
this->WriteCheckpoint(test);
- this->WriteCostData(test, p->GetTestResults().ExecutionTime);
+ this->WriteCostData(test, static_cast<float>(
+ p->GetTestResults().ExecutionTime));
this->RunningCount -= GetProcessorsUsed(test);
delete p;
}
@@ -276,7 +277,7 @@ void cmCTestMultiProcessHandler::ReadCostData()
cmSystemTools::SplitString(line.c_str(), ' ');
int index = atoi(parts[0].c_str());
- float cost = atof(parts[1].c_str());
+ float cost = static_cast<float>(atof(parts[1].c_str()));
if(this->Properties[index] && this->Properties[index]->Cost == 0)
{
this->Properties[index]->Cost = cost;
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index ffc257a..982beb3 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -297,9 +297,11 @@ void cmCTestRunTest::MemCheckPostProcess()
//----------------------------------------------------------------------
// Starts the execution of a test. Returns once it has started
-bool cmCTestRunTest::StartTest()
+bool cmCTestRunTest::StartTest(size_t total)
{
- cmCTestLog(this->CTest, HANDLER_OUTPUT, " Start "
+ cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(2*getNumWidth(total) + 8)
+ << "Start "
+ << std::setw(getNumWidth(total))
<< this->TestProperties->Index << ": "
<< this->TestProperties->Name << std::endl);
this->ComputeArguments();
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index aeffbb8..bfeda20 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -46,7 +46,7 @@ public:
bool CheckOutput();
//launch the test process, return whether it started correctly
- bool StartTest();
+ bool StartTest(size_t total);
//capture and report the test results
bool EndTest(size_t completed, size_t total, bool started);
//Called by ctest -N to log the command string
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 2ad2e37..3572b11 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -574,16 +574,16 @@ int cmCTestTestHandler::ProcessHandler()
}
}
- float percent = float(passed.size()) * 100.0f / total;
+ float percent = float(passed.size()) * 100.0f / float(total);
if ( failed.size() > 0 && percent > 99)
{
percent = 99;
}
-
+
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
<< static_cast<int>(percent + .5) << "% tests passed, "
- << failed.size() << " tests failed out of "
- << total << std::endl);
+ << failed.size() << " tests failed out of "
+ << total << std::endl);
if(this->CTest->GetLabelSummary())
{
this->PrintLabelSummary();
@@ -596,7 +596,7 @@ int cmCTestTestHandler::ProcessHandler()
if (failed.size())
{
cmGeneratedFileStream ofs;
- cmCTestLog(this->CTest, ERROR_MESSAGE, std::endl
+ cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
<< "The following tests FAILED:" << std::endl);
this->StartLogFile("TestsFailed", ofs);
@@ -1982,7 +1982,7 @@ bool cmCTestTestHandler::SetTestsProperties(
}
if ( key == "COST" )
{
- rtit->Cost = atof(val.c_str());
+ rtit->Cost = static_cast<float>(atof(val.c_str()));
}
if ( key == "RUN_SERIAL" )
{