Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix render tests #351

Merged
merged 6 commits into from
Jul 5, 2022
Merged

Fix render tests #351

merged 6 commits into from
Jul 5, 2022

Conversation

wipfli
Copy link
Member

@wipfli wipfli commented Jul 4, 2022

This pull request reverts some changes of #270 which broke the render tests.

Probably the syntax has to be adapted.

@wipfli
Copy link
Member Author

wipfli commented Jul 4, 2022

Instead of running all render tests, one can only run the ones which currently fail on main with a run-render-tests.sh script on linux which might look like this:

#!/bin/bash
cmake --build build -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "render-tests/symbol-placement/line-overscaled"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "render-tests/symbol-visibility/visible"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "render-tests/text-variable-anchor/rotated-offset"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "render-tests/text-variable-anchor/all-anchors-tile-map-mode"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "query-tests/circle-radius/tile-boundary"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "query-tests/fill-features-in/default"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "query-tests/invisible-features/zero-opacity"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "query-tests/edge-cases/box-cutting-antimeridian-z1"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "query-tests/edge-cases/box-cutting-antimeridian-z0"
./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json --filter "query-tests/edge-cases/null-island"

This script compiles and then runs the render tests, that were broken by #270. Note that there is one more render test which is broken, something like enlarge-both, but this one was already broken before #270...

Copy link
Collaborator

@ntadej ntadej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will object to this right now. Compared to the other fix, none of these changes (especially the minSectionLength one look wrong.

Can you please paste the failing test results?

@wipfli
Copy link
Member Author

wipfli commented Jul 4, 2022

On main, 11 tests fail when running ./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json

Here is the test output: https://wipfli.github.io/debug-maplibre-gl-native/main-linux-clang8-release-style.html

@ntadej
Copy link
Collaborator

ntadej commented Jul 4, 2022

On main, 11 tests fail when running ./build/mbgl-render-test-runner --manifestPath metrics/linux-clang8-release-style.json

Here is the test output: https://wipfli.github.io/debug-maplibre-gl-native/main-linux-clang8-release-style.html

Thanks. Looking into it.

Note that for posterity it may be useful to attach images to the PR.

@wipfli
Copy link
Member Author

wipfli commented Jul 4, 2022

Good idea, @ntadej. Here are some screenshots:

image

image

image

Copy link
Collaborator

@ntadej ntadej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found all the issues. Sorry again for causing them. As I said, will try to enable some more warnings to be able to spot them easier.

src/mbgl/util/grid_index.cpp Outdated Show resolved Hide resolved
src/mbgl/util/grid_index.cpp Outdated Show resolved Hide resolved
src/mbgl/text/collision_index.cpp Outdated Show resolved Hide resolved
src/mbgl/text/collision_index.cpp Outdated Show resolved Hide resolved
@wipfli
Copy link
Member Author

wipfli commented Jul 5, 2022

Don't worry about it. I think the changes in #270 are good and probably we can iron out the typos with the render tests now...

wipfli and others added 3 commits July 5, 2022 09:02
Co-authored-by: Tadej Novak <tadej@tano.si>
Co-authored-by: Tadej Novak <tadej@tano.si>
Co-authored-by: Tadej Novak <tadej@tano.si>
@ntadej
Copy link
Collaborator

ntadej commented Jul 5, 2022

OK for the last change. Can you:

  • change the type back to int
  • add static casts to int to each assignment (when calling std::min)
  • remove redundant static_casts below when this variable is used.

Copy link
Collaborator

@ntadej ntadej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for identifying the problematic files, @wipfli. Looks good to me now.

Note that at least the intersection detection code is very strange and it would be good to understand it.

@ntadej ntadej merged commit 52b5f02 into maplibre:main Jul 5, 2022
keith pushed a commit to lyft/maplibre-gl-native that referenced this pull request Jul 22, 2022
* Fix render tests

* Update src/mbgl/util/grid_index.cpp

Co-authored-by: Tadej Novak <tadej@tano.si>

* Update src/mbgl/util/grid_index.cpp

Co-authored-by: Tadej Novak <tadej@tano.si>

* Update src/mbgl/text/collision_index.cpp

Co-authored-by: Tadej Novak <tadej@tano.si>

* Add static casts

* Remove unneeded static cast

Co-authored-by: Tadej Novak <tadej@tano.si>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants