summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestStartCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestStartCommand.cxx')
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 78938b6..09cdf6e 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -17,6 +17,8 @@
#include "cmCTestStartCommand.h"
#include "cmCTest.h"
+#include "cmLocalGenerator.h"
+#include "cmGlobalGenerator.h"
bool cmCTestStartCommand::InitialPass(
std::vector<std::string> const& args)
@@ -65,6 +67,27 @@ bool cmCTestStartCommand::InitialPass(
std::cout << "Run dashboard with model " << smodel
<< " for src dir: " << src_dir << " and binary dir: " << bld_dir << std::endl;
+ std::string fname = src_dir;
+ fname += "/CTestConfig.cmake";
+ cmSystemTools::ConvertToUnixSlashes(fname);
+ if ( cmSystemTools::FileExists(fname.c_str()) )
+ {
+ std::cout << " Reading ctest configuration file: " << fname.c_str() << std::endl;
+ bool readit = m_Makefile->ReadListFile(m_Makefile->GetCurrentListFile(),
+ fname.c_str() );
+ if(!readit)
+ {
+ std::string m = "Could not find include file: ";
+ m += fname;
+ this->SetError(m.c_str());
+ return false;
+ }
+ }
+
+ m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "NightlyStartTime", "CTEST_NIGHTLY_START_TIME");
+ m_CTest->SetDartConfiguration("SourceDirectory", src_dir);
+ m_CTest->SetDartConfiguration("BuildDirectory", bld_dir);
+
int model = m_CTest->GetTestModelFromString(smodel);
m_CTest->SetTestModel(model);
m_CTest->SetProduceXML(true);