[Cmake-commits] CMake branch, master, updated. 09e748c69a31e54ad4ceb16229f4caa987d61d3b

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 1 11:08:00 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  09e748c69a31e54ad4ceb16229f4caa987d61d3b (commit)
      from  370e5b942513abd93cbd2d486a0627ccb47267af (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=09e748c69a31e54ad4ceb16229f4caa987d61d3b
commit 09e748c69a31e54ad4ceb16229f4caa987d61d3b
Author: Zach Mullen <zach.mullen at kitware.com>
Date:   Mon Mar 1 11:00:23 2010 -0500

    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.

diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index be2b691..8b51a93 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -7,6 +7,9 @@
 SourceDirectory: @PROJECT_SOURCE_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: @SITE@
 
@@ -26,6 +29,7 @@ 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 02974a2..31aff8b 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -283,8 +283,7 @@ bool cmCTestMultiProcessHandler::CheckOutput()
 //---------------------------------------------------------
 void cmCTestMultiProcessHandler::UpdateCostData()
 {
-  std::string fname = this->CTest->GetBinaryDir()
-    + "/Testing/Temporary/CTestCostData.txt";
+  std::string fname = this->CTest->GetCostDataFile();
   std::string tmpout = fname + ".tmp";
   std::fstream fout;
   fout.open(tmpout.c_str(), std::ios::out);
@@ -339,9 +338,8 @@ void cmCTestMultiProcessHandler::UpdateCostData()
 //---------------------------------------------------------
 void cmCTestMultiProcessHandler::ReadCostData()
 {
-  //TODO variable location of the cost data file
-  std::string fname = this->CTest->GetBinaryDir()
-    + "/Testing/Temporary/CTestCostData.txt";
+  std::string fname = this->CTest->GetCostDataFile();
+
   if(cmSystemTools::FileExists(fname.c_str(), true))
     {
     std::ifstream fin;
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 7b25f8e..e417e1b 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -154,6 +154,17 @@ std::string cmCTest::CurrentTime()
   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
 //----------------------------------------------------------------------------
 static size_t
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 8621b10..adf359c 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -398,6 +398,8 @@ public:
     { this->StreamOut = out; this->StreamErr = err; }
   void AddSiteProperties(std::ostream& );
   bool GetLabelSummary() { return this->LabelSummary;}
+
+  std::string GetCostDataFile();
 private:
   std::string ConfigType;
   std::string ScheduleType;

-----------------------------------------------------------------------

Summary of changes:
 Modules/DartConfiguration.tcl.in            |    4 ++++
 Source/CTest/cmCTestMultiProcessHandler.cxx |    8 +++-----
 Source/cmCTest.cxx                          |   11 +++++++++++
 Source/cmCTest.h                            |    2 ++
 4 files changed, 20 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list