diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-05-02 18:15:29 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-05-02 18:15:29 (GMT) |
commit | f1ebfb24c63e9a37d440d405d0940ee07d572ace (patch) | |
tree | 8549dde40e9728f027a357d3b16f58bdbdf41938 /Source/CTest/cmCTestStartCommand.cxx | |
parent | 572d9f11476e1964e333373169eaff6d57e3ff43 (diff) | |
download | CMake-f1ebfb24c63e9a37d440d405d0940ee07d572ace.zip CMake-f1ebfb24c63e9a37d440d405d0940ee07d572ace.tar.gz CMake-f1ebfb24c63e9a37d440d405d0940ee07d572ace.tar.bz2 |
ENH: More commands. Start working on new style ctest configuration
Diffstat (limited to 'Source/CTest/cmCTestStartCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestStartCommand.cxx | 23 |
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); |