diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2014-08-13 21:58:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-08-18 15:22:18 (GMT) |
commit | 653529ce55a9c33fa7378708793caac92a857794 (patch) | |
tree | cd706ba90eae209193c25353581bef90b78b7460 /Source/cmCTest.cxx | |
parent | 39b5df2f3714c32d498fcb7c88f5bda456f75cb3 (diff) | |
download | CMake-653529ce55a9c33fa7378708793caac92a857794.zip CMake-653529ce55a9c33fa7378708793caac92a857794.tar.gz CMake-653529ce55a9c33fa7378708793caac92a857794.tar.bz2 |
CTest: Allow / to be in the build name, and be consistent with the build name
Prior to this change / was not allowed in the build name. This was tested
with a CDash server and worked. In addition the safe build name was not
used everywhere. This caused mismatched build names to be in the xml
files going to CDash which caused different rows to be created for the
same build.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b28f3b5..a7905a4 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -488,9 +488,11 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) { cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl); cmCTestLog(this, OUTPUT, - " Site: " << this->GetCTestConfiguration("Site") << std::endl - << " Build name: " << this->GetCTestConfiguration("BuildName") - << std::endl); + " Site: " << this->GetCTestConfiguration("Site") << std::endl + << " Build name: " + << cmCTest::SafeBuildIdField( + this->GetCTestConfiguration("BuildName")) + << std::endl); cmCTestLog(this, DEBUG, "Produce XML is on" << std::endl); if ( this->TestModel == cmCTest::NIGHTLY && this->GetCTestConfiguration("NightlyStartTime").empty() ) @@ -1441,7 +1443,7 @@ std::string cmCTest::SafeBuildIdField(const std::string& value) // Disallow non-filename and non-space whitespace characters. // If they occur, replace them with "" // - const char *disallowed = "\\/:*?\"<>|\n\r\t\f\v"; + const char *disallowed = "\\:*?\"<>|\n\r\t\f\v"; if (safevalue.find_first_of(disallowed) != value.npos) { @@ -1582,12 +1584,14 @@ void cmCTest::EndXML(std::ostream& ostr) int cmCTest::GenerateCTestNotesOutput(std::ostream& os, const cmCTest::VectorOfStrings& files) { + std::string buildname = cmCTest::SafeBuildIdField( + this->GetCTestConfiguration("BuildName")); cmCTest::VectorOfStrings::const_iterator it; os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" << "<?xml-stylesheet type=\"text/xsl\" " "href=\"Dart/Source/Server/XSL/Build.xsl " "<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n" - << "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName") + << "<Site BuildName=\"" << buildname << "\" BuildStamp=\"" << this->CurrentTag << "-" << this->GetTestModelString() << "\" Name=\"" << this->GetCTestConfiguration("Site") << "\" Generator=\"ctest" |