Configurable path to CTest cost data file
Allow the user to set the CMake variable CTEST_COST_DATA_FILE, which will be used to store the cost data from test runs. If not set, defaults to the original location in the build tree Testing/Temporary dir.
This commit is contained in:
parent
370e5b9425
commit
09e748c69a
|
@ -7,6 +7,9 @@
|
||||||
SourceDirectory: @PROJECT_SOURCE_DIR@
|
SourceDirectory: @PROJECT_SOURCE_DIR@
|
||||||
BuildDirectory: @PROJECT_BINARY_DIR@
|
BuildDirectory: @PROJECT_BINARY_DIR@
|
||||||
|
|
||||||
|
# Where to place the cost data store
|
||||||
|
CostDataFile: @CTEST_COST_DATA_FILE@
|
||||||
|
|
||||||
# Site is something like machine.domain, i.e. pragmatic.crd
|
# Site is something like machine.domain, i.e. pragmatic.crd
|
||||||
Site: @SITE@
|
Site: @SITE@
|
||||||
|
|
||||||
|
@ -26,6 +29,7 @@ DropMethod: @DROP_METHOD@
|
||||||
TriggerSite: @TRIGGER_SITE@
|
TriggerSite: @TRIGGER_SITE@
|
||||||
ScpCommand: @SCPCOMMAND@
|
ScpCommand: @SCPCOMMAND@
|
||||||
|
|
||||||
|
|
||||||
# Dashboard start time
|
# Dashboard start time
|
||||||
NightlyStartTime: @NIGHTLY_START_TIME@
|
NightlyStartTime: @NIGHTLY_START_TIME@
|
||||||
|
|
||||||
|
|
|
@ -283,8 +283,7 @@ bool cmCTestMultiProcessHandler::CheckOutput()
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
void cmCTestMultiProcessHandler::UpdateCostData()
|
void cmCTestMultiProcessHandler::UpdateCostData()
|
||||||
{
|
{
|
||||||
std::string fname = this->CTest->GetBinaryDir()
|
std::string fname = this->CTest->GetCostDataFile();
|
||||||
+ "/Testing/Temporary/CTestCostData.txt";
|
|
||||||
std::string tmpout = fname + ".tmp";
|
std::string tmpout = fname + ".tmp";
|
||||||
std::fstream fout;
|
std::fstream fout;
|
||||||
fout.open(tmpout.c_str(), std::ios::out);
|
fout.open(tmpout.c_str(), std::ios::out);
|
||||||
|
@ -339,9 +338,8 @@ void cmCTestMultiProcessHandler::UpdateCostData()
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
void cmCTestMultiProcessHandler::ReadCostData()
|
void cmCTestMultiProcessHandler::ReadCostData()
|
||||||
{
|
{
|
||||||
//TODO variable location of the cost data file
|
std::string fname = this->CTest->GetCostDataFile();
|
||||||
std::string fname = this->CTest->GetBinaryDir()
|
|
||||||
+ "/Testing/Temporary/CTestCostData.txt";
|
|
||||||
if(cmSystemTools::FileExists(fname.c_str(), true))
|
if(cmSystemTools::FileExists(fname.c_str(), true))
|
||||||
{
|
{
|
||||||
std::ifstream fin;
|
std::ifstream fin;
|
||||||
|
|
|
@ -154,6 +154,17 @@ std::string cmCTest::CurrentTime()
|
||||||
return cmXMLSafe(cmCTest::CleanString(current_time)).str();
|
return cmXMLSafe(cmCTest::CleanString(current_time)).str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
std::string cmCTest::GetCostDataFile()
|
||||||
|
{
|
||||||
|
std::string fname = this->GetCTestConfiguration("CostDataFile");
|
||||||
|
if(fname == "")
|
||||||
|
{
|
||||||
|
fname= this->GetBinaryDir() + "/Testing/Temporary/CTestCostData.txt";
|
||||||
|
}
|
||||||
|
return fname;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
static size_t
|
static size_t
|
||||||
|
|
|
@ -398,6 +398,8 @@ public:
|
||||||
{ this->StreamOut = out; this->StreamErr = err; }
|
{ this->StreamOut = out; this->StreamErr = err; }
|
||||||
void AddSiteProperties(std::ostream& );
|
void AddSiteProperties(std::ostream& );
|
||||||
bool GetLabelSummary() { return this->LabelSummary;}
|
bool GetLabelSummary() { return this->LabelSummary;}
|
||||||
|
|
||||||
|
std::string GetCostDataFile();
|
||||||
private:
|
private:
|
||||||
std::string ConfigType;
|
std::string ConfigType;
|
||||||
std::string ScheduleType;
|
std::string ScheduleType;
|
||||||
|
|
Loading…
Reference in New Issue