[Cmake-commits] CMake branch, master, updated. 348f6c4d8cd0945a61c070b5094bc89518cc27e0
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Mar 1 11:59:06 EST 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 348f6c4d8cd0945a61c070b5094bc89518cc27e0 (commit)
from 09e748c69a31e54ad4ceb16229f4caa987d61d3b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=348f6c4d8cd0945a61c070b5094bc89518cc27e0
commit 348f6c4d8cd0945a61c070b5094bc89518cc27e0
Author: Zach Mullen <zach.mullen at kitware.com>
Date: Mon Mar 1 11:59:00 2010 -0500
If tests failed on the last run, have them run first next time
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 8b51a93..0b05865 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -29,7 +29,6 @@ DropMethod: @DROP_METHOD@
TriggerSite: @TRIGGER_SITE@
ScpCommand: @SCPCOMMAND@
-
# Dashboard start time
NightlyStartTime: @NIGHTLY_START_TIME@
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 31aff8b..b29e4e3 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -16,6 +16,7 @@
#include "cmSystemTools.h"
#include <stdlib.h>
#include <stack>
+#include <float.h>
cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
{
@@ -298,6 +299,7 @@ void cmCTestMultiProcessHandler::UpdateCostData()
std::string line;
while(std::getline(fin, line))
{
+ if(line == "---") break;
std::vector<cmsys::String> parts =
cmSystemTools::SplitString(line.c_str(), ' ');
//Format: <name> <previous_runs> <avg_cost>
@@ -331,6 +333,14 @@ void cmCTestMultiProcessHandler::UpdateCostData()
fout << i->second->Name << " " << i->second->PreviousRuns << " "
<< i->second->Cost << "\n";
}
+
+ // Write list of failed tests
+ fout << "---\n";
+ for(std::vector<cmStdString>::iterator i = this->Failed->begin();
+ i != this->Failed->end(); ++i)
+ {
+ fout << i->c_str() << "\n";
+ }
fout.close();
cmSystemTools::RenameFile(tmpout.c_str(), fname.c_str());
}
@@ -347,11 +357,13 @@ void cmCTestMultiProcessHandler::ReadCostData()
std::string line;
while(std::getline(fin, line))
{
+ if(line == "---") break;
+
std::vector<cmsys::String> parts =
cmSystemTools::SplitString(line.c_str(), ' ');
// Probably an older version of the file, will be fixed next run
- if(parts.size() < 3) break;
+ if(parts.size() < 3) return;
std::string name = parts[0];
int prev = atoi(parts[1].c_str());
@@ -366,6 +378,14 @@ void cmCTestMultiProcessHandler::ReadCostData()
this->Properties[index]->Cost = cost;
}
}
+ // Next part of the file is the failed tests
+ while(std::getline(fin, line))
+ {
+ if(line != "")
+ {
+ this->LastTestsFailed.push_back(line);
+ }
+ }
fin.close();
}
}
@@ -392,7 +412,16 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
for(TestMap::iterator i = this->Tests.begin();
i != this->Tests.end(); ++i)
{
- this->TestCosts[this->Properties[i->first]->Cost].insert(i->first);
+ std::string name = this->Properties[i->first]->Name;
+ if(std::find(this->LastTestsFailed.begin(), this->LastTestsFailed.end(),
+ name) != this->LastTestsFailed.end())
+ {
+ this->TestCosts[FLT_MAX].insert(i->first);
+ }
+ else
+ {
+ this->TestCosts[this->Properties[i->first]->Cost].insert(i->first);
+ }
}
}
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 6136103..ebec6c7 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -56,7 +56,6 @@ public:
cmCTestTestHandler * GetTestHandler()
{ return this->TestHandler; }
protected:
- cmCTest* CTest;
// Start the next test or tests as many as are allowed by
// ParallelLevel
void StartNextTests();
@@ -99,10 +98,12 @@ protected:
std::map<int, cmStdString> TestOutput;
std::vector<cmStdString>* Passed;
std::vector<cmStdString>* Failed;
+ std::vector<std::string> LastTestsFailed;
std::vector<cmCTestTestHandler::cmCTestTestResult>* TestResults;
size_t ParallelLevel; // max number of process that can be run at once
std::set<cmCTestRunTest*> RunningTests; // current running tests
cmCTestTestHandler * TestHandler;
+ cmCTest* CTest;
};
#endif
-----------------------------------------------------------------------
Summary of changes:
Modules/DartConfiguration.tcl.in | 1 -
Source/CTest/cmCTestMultiProcessHandler.cxx | 33 +++++++++++++++++++++++++-
Source/CTest/cmCTestMultiProcessHandler.h | 3 +-
3 files changed, 33 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list