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.
This commit is contained in:
Aleksandar Stojiljkovic
2019-08-06 16:59:25 +03:00
parent acfcd5c29c
commit b5d71fbca0
4 changed files with 26 additions and 4 deletions

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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() };

View File

@@ -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);