Improve filtering for tests that need EGL
Browse files at this commit082d0581b76e280b3d26f2f01695a291f6f55f39Parent: fd6dd823 changed files +10 -3
- docs/wiki/Packaging-niri.md +7 -0
- flake.nix +1 -1
- src/tests/animations.rs +2 -2
docs/wiki/Packaging-niri.mdmodified+7 -0
| @@ -44,6 +44,13 @@ $ export RAYON_NUM_THREADS=2 | ||
| 44 | 44 | |
| 45 | 45 | Don't forget to exclude the development-only `niri-visual-tests` crate when running tests. |
| 46 | 46 | |
| 47 | +Some tests require surfaceless EGL to be available at test time. | |
| 48 | +If this is problematic, you can skip them like so: | |
| 49 | + | |
| 50 | +``` | |
| 51 | +$ cargo test -- --skip=::egl | |
| 52 | +``` | |
| 53 | + | |
| 47 | 54 | You may also want to set the `RUN_SLOW_TESTS=1` environment variable to run the slower tests. |
| 48 | 55 | |
| 49 | 56 | ### Version string |
flake.nixmodified+1 -1
| @@ -118,7 +118,7 @@ | ||
| 118 | 118 | checkFlags = [ |
| 119 | 119 | # These tests require the ability to access a "valid EGL Display", but that won't work |
| 120 | 120 | # inside the Nix sandbox |
| 121 | - "--skip=tests::animations" | |
| 121 | + "--skip=::egl" | |
| 122 | 122 | ]; |
| 123 | 123 | |
| 124 | 124 | postInstall = |
src/tests/animations.rsmodified+2 -2
| @@ -124,7 +124,7 @@ fn set_up_two_in_column() -> (Fixture, ClientId, WlSurface, WlSurface) { | ||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | #[test] |
| 127 | -fn height_resize_animates_next_y() { | |
| 127 | +fn egl_height_resize_animates_next_y() { | |
| 128 | 128 | let (mut f, id, surface1, surface2) = set_up_two_in_column(); |
| 129 | 129 | |
| 130 | 130 | // Issue a resize. |
| @@ -171,7 +171,7 @@ fn height_resize_animates_next_y() { | ||
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | #[test] |
| 174 | -fn clientside_height_change_doesnt_animate() { | |
| 174 | +fn egl_clientside_height_change_doesnt_animate() { | |
| 175 | 175 | let (mut f, id, surface1, _surface2) = set_up_two_in_column(); |
| 176 | 176 | |
| 177 | 177 | // The initial state. |