[render-test] Add cache database path to the manifest
A path relative to the manifest pointing at the data cache.
This commit is contained in:
@@ -44,6 +44,10 @@ const std::string& Manifest::getResultPath() const {
|
||||
return resultPath;
|
||||
}
|
||||
|
||||
const std::string& Manifest::getCachePath() const {
|
||||
return cachePath;
|
||||
}
|
||||
|
||||
const std::set<std::string>& Manifest::getProbes() const {
|
||||
return probes;
|
||||
}
|
||||
@@ -305,6 +309,18 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
|
||||
return mbgl::nullopt;
|
||||
}
|
||||
}
|
||||
if (document.HasMember("cache_path")) {
|
||||
const auto& cachePathValue = document["cache_path"];
|
||||
if (!cachePathValue.IsString()) {
|
||||
mbgl::Log::Warning(
|
||||
mbgl::Event::General, "Invalid cache_path is provided inside the manifest file: %s", filePath.c_str());
|
||||
return mbgl::nullopt;
|
||||
}
|
||||
manifest.cachePath = (getValidPath(manifest.manifestPath, ".") / cachePathValue.GetString()).string();
|
||||
if (manifest.cachePath.empty()) {
|
||||
return mbgl::nullopt;
|
||||
}
|
||||
}
|
||||
mbgl::filesystem::path baseTestPath;
|
||||
if (document.HasMember("base_test_path")) {
|
||||
const auto& testPathValue = document["base_test_path"];
|
||||
|
||||
Reference in New Issue
Block a user