aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-08-27 14:20:22 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-08-29 10:07:15 +0300
commit082d0581b76e280b3d26f2f01695a291f6f55f39 (patch)
tree03e140b9eb909a12ff5d1077748f98cb05d6ec5d
parentfd6dd826fb40949be2df5c0bf123f911832423d9 (diff)
downloadniri-082d0581b76e280b3d26f2f01695a291f6f55f39.tar.gz
niri-082d0581b76e280b3d26f2f01695a291f6f55f39.tar.bz2
niri-082d0581b76e280b3d26f2f01695a291f6f55f39.zip
Improve filtering for tests that need EGL
This way we don't skip the layout animation tests.
-rw-r--r--docs/wiki/Packaging-niri.md7
-rw-r--r--flake.nix2
-rw-r--r--src/tests/animations.rs4
3 files changed, 10 insertions, 3 deletions
diff --git a/docs/wiki/Packaging-niri.md b/docs/wiki/Packaging-niri.md
index ea809abf..5c5f16cd 100644
--- a/docs/wiki/Packaging-niri.md
+++ b/docs/wiki/Packaging-niri.md
@@ -44,6 +44,13 @@ $ export RAYON_NUM_THREADS=2
Don't forget to exclude the development-only `niri-visual-tests` crate when running tests.
+Some tests require surfaceless EGL to be available at test time.
+If this is problematic, you can skip them like so:
+
+```
+$ cargo test -- --skip=::egl
+```
+
You may also want to set the `RUN_SLOW_TESTS=1` environment variable to run the slower tests.
### Version string
diff --git a/flake.nix b/flake.nix
index 0e198081..435f7521 100644
--- a/flake.nix
+++ b/flake.nix
@@ -118,7 +118,7 @@
checkFlags = [
# These tests require the ability to access a "valid EGL Display", but that won't work
# inside the Nix sandbox
- "--skip=tests::animations"
+ "--skip=::egl"
];
postInstall =
diff --git a/src/tests/animations.rs b/src/tests/animations.rs
index 90d64dc8..c28e5e63 100644
--- a/src/tests/animations.rs
+++ b/src/tests/animations.rs
@@ -124,7 +124,7 @@ fn set_up_two_in_column() -> (Fixture, ClientId, WlSurface, WlSurface) {
}
#[test]
-fn height_resize_animates_next_y() {
+fn egl_height_resize_animates_next_y() {
let (mut f, id, surface1, surface2) = set_up_two_in_column();
// Issue a resize.
@@ -171,7 +171,7 @@ fn height_resize_animates_next_y() {
}
#[test]
-fn clientside_height_change_doesnt_animate() {
+fn egl_clientside_height_change_doesnt_animate() {
let (mut f, id, surface1, _surface2) = set_up_two_in_column();
// The initial state.