summaryrefslogtreecommitdiff
path: root/render-test/manifest_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'render-test/manifest_parser.cpp')
-rw-r--r--render-test/manifest_parser.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/render-test/manifest_parser.cpp b/render-test/manifest_parser.cpp
index 01d2246685..bcc10c91d4 100644
--- a/render-test/manifest_parser.cpp
+++ b/render-test/manifest_parser.cpp
@@ -44,6 +44,10 @@ const std::string& Manifest::getResultPath() const {
return resultPath;
}
+const std::set<std::string>& Manifest::getProbes() const {
+ return probes;
+}
+
void Manifest::doShuffle(uint32_t seed) {
std::seed_seq sequence{seed};
std::mt19937 shuffler(sequence);
@@ -389,6 +393,25 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
manifest.ignores = parseIgnores(ignorePaths);
}
+ if (document.HasMember("probes")) {
+ const auto& probesValue = document["probes"];
+ if (!probesValue.IsArray()) {
+ mbgl::Log::Warning(mbgl::Event::General,
+ "Provided probes inside the manifest file: %s is not a valid array",
+ filePath.c_str());
+ return mbgl::nullopt;
+ }
+ for (const auto& value : probesValue.GetArray()) {
+ if (!value.IsString()) {
+ mbgl::Log::Warning(mbgl::Event::General,
+ "Invalid probe type is provoided inside the manifest file: %s",
+ filePath.c_str());
+ return mbgl::nullopt;
+ }
+ manifest.probes.emplace(value.GetString());
+ }
+ }
+
manifest.testRootPath = enbaleProbeTest ? probeTestPath.string() : baseTestPath.string();
if (manifest.testRootPath.back() == '/') {
manifest.testRootPath.pop_back();