summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-08-03 20:41:49 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-08-03 20:41:49 (GMT)
commit1a11a2d0c0dc04ef3bcae15ad765fe1f80607598 (patch)
treeaafed860da860ec29b61298eabeb8ac1df66d253 /Source/cmCTest.cxx
parent6baaf296a5ca4d463d9bc73d844a38582bf0f763 (diff)
downloadCMake-1a11a2d0c0dc04ef3bcae15ad765fe1f80607598.zip
CMake-1a11a2d0c0dc04ef3bcae15ad765fe1f80607598.tar.gz
CMake-1a11a2d0c0dc04ef3bcae15ad765fe1f80607598.tar.bz2
ENH: add a check to make sure nightly start time was specified
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 2e75515..cb80401 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -312,7 +312,7 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag,
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
if ( this->ProduceXML )
{
- cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
+ cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
cmCTestLog(this, OUTPUT,
" Site: " << this->GetCTestConfiguration("Site") << std::endl
<< " Build name: " << this->GetCTestConfiguration("BuildName")
@@ -320,8 +320,10 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag,
cmCTestLog(this, DEBUG, "Produce XML is on" << std::endl);
if ( this->GetCTestConfiguration("NightlyStartTime").empty() )
{
- cmCTestLog(this, DEBUG, "No nightly start time" << std::endl);
- cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
+ cmCTestLog(this, ERROR_MESSAGE,
+ "No nightly start time found please set in"
+ " CTestConfig.cmake or DartConfig.cmake" << std::endl);
+ cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
return 0;
}
}
@@ -1217,6 +1219,13 @@ int cmCTest::RunTest(std::vector<const char*> argv,
//----------------------------------------------------------------------
void cmCTest::StartXML(std::ostream& ostr)
{
+ if(this->CurrentTag.empty())
+ {
+ cmCTestLog(this, ERROR_MESSAGE,
+ "Current Tag empty, this may mean"
+ " NightlStartTime was not set correctly." << std::endl);
+ cmSystemTools::SetFatalErrorOccured();
+ }
ostr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName")
<< "\" BuildStamp=\"" << this->CurrentTag << "-"