diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-12-13 14:23:47 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-12-13 15:34:06 +0200 |
commit | 515cb4e0fcd5f424fb5e058f08aff0eb95a96a58 (patch) | |
tree | 7767cfe91659d552a528c7cf954fb257e9ec8a6f | |
parent | 06a2930342483de5b673497aee2c836530ea5242 (diff) | |
download | qtlocation-mapboxgl-515cb4e0fcd5f424fb5e058f08aff0eb95a96a58.tar.gz |
[render test] Fix probes failure reports
-rw-r--r-- | render-test/parser.cpp | 8 | ||||
-rw-r--r-- | render-test/render_test.cpp | 6 | ||||
-rw-r--r-- | render-test/runner.cpp | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/render-test/parser.cpp b/render-test/parser.cpp index 2373413da5..05f0e16293 100644 --- a/render-test/parser.cpp +++ b/render-test/parser.cpp @@ -949,7 +949,6 @@ TestOperations parseTestOperations(TestMetadata& metadata, const Manifest& manif }); } else if (operationArray[0].GetString() == memoryProbeOp) { // probeMemory - assert(AllocationIndex::isActive()); assert(operationArray.Size() >= 2u); assert(operationArray[1].IsString()); std::string mark = std::string(operationArray[1].GetString(), operationArray[1].GetStringLength()); @@ -959,6 +958,7 @@ TestOperations parseTestOperations(TestMetadata& metadata, const Manifest& manif tolerance = float(operationArray[2].GetDouble()); } result.emplace_back([mark, tolerance](TestContext& ctx) { + assert(AllocationIndex::isActive()); auto emplaced = ctx.getMetadata().metrics.memory.emplace( std::piecewise_construct, std::forward_as_tuple(std::move(mark)), @@ -1052,9 +1052,9 @@ TestOperations parseTestOperations(TestMetadata& metadata, const Manifest& manif array.emplace_back(*arrayVal); } } - std::unordered_map<std::string, Value> result; - result[k] = std::move(array); - stateValue = std::move(result); + std::unordered_map<std::string, Value> values; + values[k] = std::move(array); + stateValue = std::move(values); valueParsed = true; return nullopt; diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp index 4be6d4abc1..d8d980acf8 100644 --- a/render-test/render_test.cpp +++ b/render-test/render_test.cpp @@ -177,11 +177,7 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) { } } - bool errored = !metadata.errorMessage.empty(); - if (!errored) { - errored = !runner.run(metadata) || !metadata.errorMessage.empty(); - } - + bool errored = !metadata.errorMessage.empty() || !runner.run(metadata); bool passed = !errored && (!metadata.outputsImage || !metadata.diff.empty()) && metadata.difference <= metadata.allowed; diff --git a/render-test/runner.cpp b/render-test/runner.cpp index a0dba58f05..88db5ba9b4 100644 --- a/render-test/runner.cpp +++ b/render-test/runner.cpp @@ -688,7 +688,6 @@ bool TestRunner::run(TestMetadata& metadata) { ctx.runnerImpl = maps[key].get(); auto& frontend = ctx.getFrontend(); - // auto& map = ctx.getMap(); resetContext(metadata, ctx); @@ -711,7 +710,8 @@ bool TestRunner::run(TestMetadata& metadata) { } if (metadata.renderTest) { - return checkRenderTestResults(std::move(result.image), metadata) && checkProbingResults(metadata); + (void)checkProbingResults(metadata); + return checkRenderTestResults(std::move(result.image), metadata); } else { std::vector<mbgl::Feature> features; assert(metadata.document["metadata"]["test"]["queryGeometry"].IsArray()); |