summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.h
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2021-07-01 16:40:41 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2021-07-01 19:16:23 (GMT)
commit5489ce74b349ed31d6abb6ee5a0aaa17b10b474d (patch)
tree29ae508b56f972899af0c6ec482b6ef66d1f7f29 /Source/CTest/cmCTestTestHandler.h
parent7817aa6fa4097a2c642ff1333be72f93a6e32ed1 (diff)
downloadCMake-5489ce74b349ed31d6abb6ee5a0aaa17b10b474d.zip
CMake-5489ce74b349ed31d6abb6ee5a0aaa17b10b474d.tar.gz
CMake-5489ce74b349ed31d6abb6ee5a0aaa17b10b474d.tar.bz2
ctest: support <CTestMeasurement> for runtime measurements
Teach CTest to parse output for <CTestMeasurement> in addition to <DartMeasurement> for measurements defined at runtime. Use a new class (cmCTestTestMeasurementXMLParser) derived from cmXMLParser to parse the data and attributes these XML elements. This is an improvement over our previous approach of using a series of regular expressions. As part of this commit we also rename some member variables and methods to make their purpose more clear. DartStuff -> AllTestMeasurementsRegex DartStuff1 -> SingleTestMeasurementRegex DartString -> TestMeasurementsOutput GenerateDartOutput() -> GenerateCTestXML() GenerateRegressionImages() -> RecordCustomTestMeasurements() cmCTestRunTest::DartProcessing() -> ParseOutputForMeasurements()
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.h')
-rw-r--r--Source/CTest/cmCTestTestHandler.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index cc19984..1b42647 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -177,7 +177,7 @@ public:
std::string CompletionStatus;
std::string CustomCompletionStatus;
std::string Output;
- std::string DartString;
+ std::string TestMeasurementsOutput;
int TestCount;
cmCTestTestProperties* Properties;
};
@@ -276,9 +276,9 @@ public:
private:
/**
- * Generate the Dart compatible output
+ * Write test results in CTest's Test.xml format
*/
- virtual void GenerateDartOutput(cmXMLWriter& xml);
+ virtual void GenerateCTestXML(cmXMLWriter& xml);
/**
* Write test results in JUnit XML format
@@ -348,8 +348,7 @@ private:
cmCTestResourceSpec ResourceSpec;
std::string ResourceSpecFile;
- void GenerateRegressionImages(cmXMLWriter& xml, const std::string& dart);
- cmsys::RegularExpression DartStuff1;
+ void RecordCustomTestMeasurements(cmXMLWriter& xml, std::string content);
void CheckLabelFilter(cmCTestTestProperties& it);
void CheckLabelFilterExclude(cmCTestTestProperties& it);
void CheckLabelFilterInclude(cmCTestTestProperties& it);
@@ -358,7 +357,8 @@ private:
bool UseUnion;
ListOfTests TestList;
size_t TotalNumberOfTests;
- cmsys::RegularExpression DartStuff;
+ cmsys::RegularExpression AllTestMeasurementsRegex;
+ cmsys::RegularExpression SingleTestMeasurementRegex;
cmsys::RegularExpression CustomCompletionStatusRegex;
cmsys::RegularExpression CustomLabelRegex;