diff options
-rw-r--r-- | render-test/linux-ignores.json | 5 | ||||
-rw-r--r-- | render-test/mac-ignores.json | 5 | ||||
-rw-r--r-- | render-test/parser.cpp | 18 | ||||
-rw-r--r-- | render-test/runner.cpp | 2 |
4 files changed, 26 insertions, 4 deletions
diff --git a/render-test/linux-ignores.json b/render-test/linux-ignores.json new file mode 100644 index 0000000000..87bef31c5c --- /dev/null +++ b/render-test/linux-ignores.json @@ -0,0 +1,5 @@ +{ + "render-tests/regressions/mapbox-gl-js#7066": "Failing with mbgl-render-test", + "render-tests/regressions/mapbox-gl-js#5642": "Failing with mbgl-render-test" +} + diff --git a/render-test/mac-ignores.json b/render-test/mac-ignores.json new file mode 100644 index 0000000000..87bef31c5c --- /dev/null +++ b/render-test/mac-ignores.json @@ -0,0 +1,5 @@ +{ + "render-tests/regressions/mapbox-gl-js#7066": "Failing with mbgl-render-test", + "render-tests/regressions/mapbox-gl-js#5642": "Failing with mbgl-render-test" +} + diff --git a/render-test/parser.cpp b/render-test/parser.cpp index 089a5c45c9..fd048f08c6 100644 --- a/render-test/parser.cpp +++ b/render-test/parser.cpp @@ -260,10 +260,22 @@ ArgumentsTuple parseArguments(int argc, char** argv) { std::vector<std::pair<std::string, std::string>> parseIgnores() { std::vector<std::pair<std::string, std::string>> ignores; - auto path = mbgl::filesystem::path(TEST_RUNNER_ROOT_PATH).append("platform/node/test/ignores.json"); + auto mainIgnoresPath = mbgl::filesystem::path(TEST_RUNNER_ROOT_PATH).append("platform/node/test/ignores.json"); - auto maybeIgnores = readJson(path.string()); - if (maybeIgnores.is<mbgl::JSDocument>()) { + mbgl::filesystem::path platformSpecificIgnores; + +#ifdef __APPLE__ + platformSpecificIgnores = mbgl::filesystem::path(TEST_RUNNER_ROOT_PATH).append("render-test/mac-ignores.json"); +#elif __linux__ + platformSpecificIgnores = mbgl::filesystem::path(TEST_RUNNER_ROOT_PATH).append("render-test/linux-ignores.json"); +#endif + + std::vector<mbgl::filesystem::path> ignoresPaths = { mainIgnoresPath, platformSpecificIgnores }; + for (auto path: ignoresPaths) { + auto maybeIgnores = readJson(path); + if (!maybeIgnores.is<mbgl::JSDocument>()) { + continue; + } for (const auto& property : maybeIgnores.get<mbgl::JSDocument>().GetObject()) { const std::string ignore = { property.name.GetString(), property.name.GetStringLength() }; diff --git a/render-test/runner.cpp b/render-test/runner.cpp index dd6aef3a54..5bd855c43a 100644 --- a/render-test/runner.cpp +++ b/render-test/runner.cpp @@ -62,7 +62,7 @@ bool TestRunner::checkImage(mbgl::PremultipliedImage&& actual, TestMetadata& met pixels = // implicitly converting from uint64_t mapbox::pixelmatch(actual.data.get(), expected.data.get(), expected.size.width, - expected.size.height, diff.data.get(), 0.16); // GL JS uses 0.1285 + expected.size.height, diff.data.get(), 0.1285); // Defined in GL JS metadata.diff = mbgl::encodePNG(diff); |