summaryrefslogtreecommitdiff
path: root/render-test
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-12-21 00:54:15 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-01-08 13:07:12 +0200
commit502ddd3c8ab723664cc59957ce7190aafd2ee58f (patch)
treefdd413c14909d412b42e13df0792ac8620572605 /render-test
parentf14985f783f2f96fc944e397c6c5072f8d3bc9b5 (diff)
downloadqtlocation-mapboxgl-502ddd3c8ab723664cc59957ce7190aafd2ee58f.tar.gz
[render-test] Fixed typo and remove unused
Diffstat (limited to 'render-test')
-rw-r--r--render-test/manifest_parser.cpp43
1 files changed, 14 insertions, 29 deletions
diff --git a/render-test/manifest_parser.cpp b/render-test/manifest_parser.cpp
index 8402b24def..34be621a7f 100644
--- a/render-test/manifest_parser.cpp
+++ b/render-test/manifest_parser.cpp
@@ -249,7 +249,7 @@ mbgl::filesystem::path getValidPath(const std::string& manifestPath, const std::
if (mbgl::filesystem::exists(result)) {
return result.lexically_normal();
}
- mbgl::Log::Warning(mbgl::Event::General, "Invalid path is provoided inside the manifest file: %s", path.c_str());
+ mbgl::Log::Warning(mbgl::Event::General, "Invalid path is provided inside the manifest file: %s", path.c_str());
return mbgl::filesystem::path{};
}
@@ -273,7 +273,7 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
const auto& assetPathValue = document["asset_path"];
if (!assetPathValue.IsString()) {
mbgl::Log::Warning(
- mbgl::Event::General, "Invalid assetPath is provoided inside the manifest file: %s", filePath.c_str());
+ mbgl::Event::General, "Invalid asset_path is provided inside the manifest file: %s", filePath.c_str());
return mbgl::nullopt;
}
manifest.assetPath = (getValidPath(manifest.manifestPath, assetPathValue.GetString()) / "").string();
@@ -285,7 +285,7 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
const auto& vendorPathValue = document["vendor_path"];
if (!vendorPathValue.IsString()) {
mbgl::Log::Warning(
- mbgl::Event::General, "Invalid vendorPath is provoided inside the manifest file: %s", filePath.c_str());
+ mbgl::Event::General, "Invalid vendor_path is provided inside the manifest file: %s", filePath.c_str());
return mbgl::nullopt;
}
manifest.vendorPath = (getValidPath(manifest.manifestPath, vendorPathValue.GetString()) / "").string();
@@ -297,7 +297,7 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
const auto& resultPathValue = document["result_path"];
if (!resultPathValue.IsString()) {
mbgl::Log::Warning(
- mbgl::Event::General, "Invalid assetPath is provoided inside the manifest file: %s", filePath.c_str());
+ mbgl::Event::General, "Invalid result_path is provided inside the manifest file: %s", filePath.c_str());
return mbgl::nullopt;
}
manifest.resultPath = (getValidPath(manifest.manifestPath, resultPathValue.GetString()) / "").string();
@@ -309,8 +309,9 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
if (document.HasMember("base_test_path")) {
const auto& testPathValue = document["base_test_path"];
if (!testPathValue.IsString()) {
- mbgl::Log::Warning(
- mbgl::Event::General, "Invalid testPath is provoided inside the manifest file: %s", filePath.c_str());
+ mbgl::Log::Warning(mbgl::Event::General,
+ "Invalid base_test_path is provided inside the manifest file: %s",
+ filePath.c_str());
return mbgl::nullopt;
}
baseTestPath = getValidPath(manifest.manifestPath, testPathValue.GetString());
@@ -318,28 +319,12 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
return mbgl::nullopt;
}
}
- mbgl::filesystem::path probeTestPath;
- bool enbaleProbeTest{false};
- if (document.HasMember("probe_test_path")) {
- const auto& testPathValue = document["probe_test_path"];
- if (!testPathValue.IsString()) {
- mbgl::Log::Warning(
- mbgl::Event::General, "Invalid testPath is provoided inside the manifest file: %s", filePath.c_str());
- return mbgl::nullopt;
- }
- probeTestPath = getValidPath(manifest.manifestPath, testPathValue.GetString());
- if (probeTestPath.empty()) {
- return mbgl::nullopt;
- }
- enbaleProbeTest = true;
- }
mbgl::filesystem::path expectedMetricPath;
if (document.HasMember("metric_path")) {
const auto& metricPathValue = document["metric_path"];
if (!metricPathValue.IsString()) {
- mbgl::Log::Warning(mbgl::Event::General,
- "Invalid metric_path is provoided inside the manifest file: %s",
- filePath.c_str());
+ mbgl::Log::Warning(
+ mbgl::Event::General, "Invalid metric_path is provided inside the manifest file: %s", filePath.c_str());
return mbgl::nullopt;
}
expectedMetricPath = getValidPath(manifest.manifestPath, metricPathValue.GetString());
@@ -359,7 +344,7 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
for (const auto& value : expectationPathValue.GetArray()) {
if (!value.IsString()) {
mbgl::Log::Warning(mbgl::Event::General,
- "Invalid expectation path item is provoided inside the manifest file: %s",
+ "Invalid expectation path item is provided inside the manifest file: %s",
filePath.c_str());
return mbgl::nullopt;
}
@@ -381,7 +366,7 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
for (const auto& value : ignorePathValue.GetArray()) {
if (!value.IsString()) {
mbgl::Log::Warning(mbgl::Event::General,
- "Invalid ignore path item is provoided inside the manifest file: %s",
+ "Invalid ignore path item is provided inside the manifest file: %s",
filePath.c_str());
return mbgl::nullopt;
}
@@ -404,7 +389,7 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
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",
+ "Invalid probe type is provided inside the manifest file: %s",
filePath.c_str());
return mbgl::nullopt;
}
@@ -416,14 +401,14 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife
const auto& filterValue = document["filter"];
if (!filterValue.IsString()) {
mbgl::Log::Warning(
- mbgl::Event::General, "Invalid filter is provoided inside the manifest file: %s", filePath.c_str());
+ mbgl::Event::General, "Invalid filter is provided inside the manifest file: %s", filePath.c_str());
return mbgl::nullopt;
}
testFilter = filterValue.GetString();
}
- manifest.testRootPath = enbaleProbeTest ? probeTestPath.string() : baseTestPath.string();
+ manifest.testRootPath = baseTestPath.string();
if (manifest.testRootPath.back() == '/') {
manifest.testRootPath.pop_back();
}