[test-runner] Move probe related command line args to manifest
- Move probe related command line arguments to manifest, example: "probes": ["probeGFX", "probeNetwork", "probeMemory"], "metric_path": "metrics/linux" - Use manifest file name as a postfix for a result page - Move injected probes 'begin' section before map object creation - Generalize artifact storing shell script
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user