diff options
author | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-06 16:59:25 +0300 |
---|---|---|
committer | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-07 10:26:39 +0300 |
commit | b5d71fbca00d2aac00ff59165178b5bde91bd838 (patch) | |
tree | 0e194aa3a105104e59de637438adb8bc184a96b0 /render-test/parser.cpp | |
parent | acfcd5c29c15e91e3bf80b1503d63caef1487149 (diff) | |
download | qtlocation-mapboxgl-b5d71fbca00d2aac00ff59165178b5bde91bd838.tar.gz |
mbgl-render-test runner - use the same tolerance as with node render test
Two render tests failing only with mbgl-render-tests are added to platform
specific ignores. This is to be extended with fill-extrusion-pattern failing only on mac.
Diffstat (limited to 'render-test/parser.cpp')
-rw-r--r-- | render-test/parser.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
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() }; |