diff options
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index ffa79c3..c1a8dc8 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -608,6 +608,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, const std::string& testname = it->Name; std::vector<std::string>& args = it->Args; cmCTestTestResult cres; + cres.Properties = &*it; cres.ExecutionTime = 0; cres.ReturnValue = -1; cres.Status = cmCTestTestHandler::NOT_RUN; @@ -1001,6 +1002,20 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os) << result->CompletionStatus << "</Value></NamedMeasurement>\n"; } os + << "\t\t\t<NamedMeasurement type=\"text/string\" " + << "name=\"Command Line\"><Value>" + << result->FullCommandLine << "</Value></NamedMeasurement>\n"; + std::map<cmStdString,cmStdString>::iterator measureIt; + for ( measureIt = result->Properties->Measurements.begin(); + measureIt != result->Properties->Measurements.end(); + ++ measureIt ) + { + os + << "\t\t\t<NamedMeasurement type=\"text/string\" " + << "name=\"" << measureIt->first.c_str() << "\"><Value>" + << measureIt->second.c_str() << "</Value></NamedMeasurement>\n"; + } + os << "\t\t\t<Measurement>\n" << "\t\t\t\t<Value>"; os << cmCTest::MakeXMLSafe(result->Output); @@ -1635,6 +1650,20 @@ bool cmCTestTestHandler::SetTestsProperties( cmsys::RegularExpression(crit->c_str())); } } + if ( key == "MEASUREMENT" ) + { + size_t pos = val.find_first_of("="); + if ( pos != val.npos ) + { + std::string mKey = val.substr(0, pos); + const char* mVal = val.c_str() + pos + 1; + rtit->Measurements[mKey] = mVal; + } + else + { + rtit->Measurements[val] = "1"; + } + } if ( key == "PASS_REGULAR_EXPRESSION" ) { std::vector<std::string> lval; |