summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorDaniel Sim <dannie.sim@gmail.com>2024-03-06 15:06:20 (GMT)
committerDaniel Sim <dannie.sim@gmail.com>2024-03-06 15:06:20 (GMT)
commit06860d5c12ddc5ccf94b94c88861c6f0a8293f23 (patch)
tree6f52e431a42e6313ab1cd60de768926388cec3fd /Source/CTest
parentac411fc8b3922166d9309bc9fb3210224fddbfdb (diff)
downloadCMake-06860d5c12ddc5ccf94b94c88861c6f0a8293f23.zip
CMake-06860d5c12ddc5ccf94b94c88861c6f0a8293f23.tar.gz
CMake-06860d5c12ddc5ccf94b94c88861c6f0a8293f23.tar.bz2
ctest: Show custom test properties in --show-only=json-v1
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx5
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 34f9d43..4c39d6e 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -1166,6 +1166,11 @@ static Json::Value DumpCTestProperties(
properties.append(
DumpCTestProperty("WORKING_DIRECTORY", testProperties.Directory));
}
+ if (!testProperties.CustomProperties.empty()) {
+ for (auto const& it : testProperties.CustomProperties) {
+ properties.append(DumpCTestProperty(it.first, it.second));
+ }
+ }
return properties;
}
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 0a8d4b8..6fa46a5 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -2435,6 +2435,8 @@ bool cmCTestTestHandler::SetTestsProperties(
rt.TimeoutRegularExpressions.emplace_back(cr, cr);
}
}
+ } else {
+ rt.CustomProperties[key] = val;
}
}
}
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 84e6098..fb88ea0 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -145,6 +145,7 @@ public:
std::vector<std::pair<cmsys::RegularExpression, std::string>>
TimeoutRegularExpressions;
std::map<std::string, std::string> Measurements;
+ std::map<std::string, std::string> CustomProperties;
bool IsInBasedOnREOptions = true;
bool WillFail = false;
bool Disabled = false;