diff options
Diffstat (limited to 'render-test')
-rw-r--r-- | render-test/metadata.hpp | 1 | ||||
-rw-r--r-- | render-test/render_test.cpp | 2 | ||||
-rw-r--r-- | render-test/runner.cpp | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/render-test/metadata.hpp b/render-test/metadata.hpp index 32eb3455ad..ba4a875b0c 100644 --- a/render-test/metadata.hpp +++ b/render-test/metadata.hpp @@ -132,6 +132,7 @@ struct TestMetadata { mbgl::JSDocument document; bool renderTest = true; bool outputsImage = true; + bool ignoredTest = false; mbgl::Size size{ 512u, 512u }; float pixelRatio = 1.0f; diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp index 13d6992e43..4be6d4abc1 100644 --- a/render-test/render_test.cpp +++ b/render-test/render_test.cpp @@ -169,7 +169,7 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) { const std::string ignoreName = id; const auto it = std::find_if(ignores.cbegin(), ignores.cend(), [&ignoreName](auto pair) { return pair.first == ignoreName; }); if (it != ignores.end()) { - shouldIgnore = true; + metadata.ignoredTest = shouldIgnore = true; ignoreReason = it->second; if (ignoreReason.rfind("skip", 0) == 0) { printf(ANSI_COLOR_GRAY "* skipped %s (%s)" ANSI_COLOR_RESET "\n", id.c_str(), ignoreReason.c_str()); diff --git a/render-test/runner.cpp b/render-test/runner.cpp index 37adcc8f7c..41f7de15bd 100644 --- a/render-test/runner.cpp +++ b/render-test/runner.cpp @@ -315,7 +315,7 @@ bool TestRunner::checkRenderTestResults(mbgl::PremultipliedImage&& actualImage, } bool TestRunner::checkProbingResults(TestMetadata& resultMetadata) { - if (resultMetadata.metrics.isEmpty()) return true; + if (resultMetadata.metrics.isEmpty() || resultMetadata.ignoredTest) return true; const auto writeMetrics = [&resultMetadata](const mbgl::filesystem::path& path, const std::string& message = std::string()) { mbgl::filesystem::create_directories(path); @@ -1250,6 +1250,7 @@ bool runInjectedProbe(TestMetadata& metadata, } bool TestRunner::runInjectedProbesBegin(TestMetadata& metadata_, RunContext& ctx_) { + if (metadata_.ignoredTest) return true; const std::string mark = " - default - start"; static const InjectedProbeMap beginInjectedProbeMap = { {// Injected memory probe begin @@ -1284,6 +1285,7 @@ bool TestRunner::runInjectedProbesBegin(TestMetadata& metadata_, RunContext& ctx } bool TestRunner::runInjectedProbesEnd(TestMetadata& metadata_, RunContext& ctx_, mbgl::gfx::RenderingStats stats) { + if (metadata_.ignoredTest) return true; const std::string mark = " - default - end"; static const InjectedProbeMap endInjectedProbeMap = { {// Injected memory probe end |