From ecd4ab0126867a9c2c97dd49d4428e1bb0d2aeb8 Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Sat, 27 Jun 2026 02:55:48 -0700 Subject: [PATCH] chore: move tests from ignored to e2e flag checking --- .github/workflows/e2e.yml | 4 ++-- CONTRIBUTING.md | 17 +++++++++-------- Cargo.toml | 5 +++++ docs/E2E_TESTING.md | 21 +++++++++++---------- tests/headless_control.rs | 2 -- tests/waydriver_hearthspace.rs | 3 --- 6 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index f6cfaa2..1df6e18 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -50,7 +50,7 @@ jobs: uses: ./.github/actions/setup-rust - name: Run headless control E2E tests - run: cargo test --features test-apps --test headless_control -- --ignored + run: cargo test --features e2e,test-apps --test headless_control - name: Run WayDriver E2E tests - run: cargo test --features e2e,test-apps --test waydriver_hearthspace -- --ignored + run: cargo test --features e2e,test-apps --test waydriver_hearthspace diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7449de5..b46586f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -133,22 +133,23 @@ button commands use Linux input button codes, for example `272` (`0x110`) for th left mouse button. The WayDriver backend adapter lives in `crates/waydriver-hearthspace` and uses -the published `waydriver` crate. Its ignored smoke tests can be run with: +the published `waydriver` crate. Its E2E smoke tests can be run with: ```sh -cargo test --features e2e --test waydriver_hearthspace -- --ignored -cargo test --features e2e,test-apps --test waydriver_hearthspace -- --ignored +cargo test --features e2e --test waydriver_hearthspace +cargo test --features e2e,test-apps --test waydriver_hearthspace ``` The feature-gated WayDriver `Session` test launches the GTK test app through WayDriver, locates its `Research Workspace` heading by XPath on the AT-SPI tree, clicks it, and captures a screenshot. -The non-feature WayDriver ignored suite also verifies the Xilem shell's -Masonry/AccessKit tree. That test starts a private `dbus-daemon --session`, points -Hearthspace and WayDriver at it, and enables `org.a11y.Status.ScreenReaderEnabled` -inside that throwaway bus because AccessKit's Unix bridge registers with AT-SPI -only while screen-reader status is active. +The non-`test-apps` WayDriver suite also verifies the Xilem shell's +Masonry/AccessKit tree. That test starts a private `dbus-daemon --session`, +points Hearthspace and WayDriver at it, and enables +`org.a11y.Status.ScreenReaderEnabled` inside that throwaway bus because +AccessKit's Unix bridge registers with AT-SPI only while screen-reader status is +active. See [docs/E2E_TESTING.md](./docs/E2E_TESTING.md) for the evergreen technical architecture of the headless and WayDriver E2E harness. diff --git a/Cargo.toml b/Cargo.toml index de680b4..cfee0b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,11 @@ tempfile = "3" tokio = { version = "1", features = ["macros", "process", "rt-multi-thread", "time"] } tokio-util = "0.7" +[[test]] +name = "headless_control" +path = "tests/headless_control.rs" +required-features = ["e2e"] + [[test]] name = "waydriver_hearthspace" path = "tests/waydriver_hearthspace.rs" diff --git a/docs/E2E_TESTING.md b/docs/E2E_TESTING.md index 46eee73..4e4970c 100644 --- a/docs/E2E_TESTING.md +++ b/docs/E2E_TESTING.md @@ -163,9 +163,10 @@ WayDriver `Session` path: launches the GTK test app through WayDriver, locates `Research Workspace` by XPath, clicks it, and captures a screenshot. -The ignored E2E tests are serialized inside each test binary with a static Tokio -mutex because they share deterministic socket names and, for the shell test, -temporarily modify process environment variables. +The E2E test targets require the Cargo feature `e2e`, which keeps them out of +normal `cargo test --all-targets` and CI runs. Tests are serialized inside each +test binary with a static lock because they share deterministic socket names +and, for the shell test, temporarily modify process environment variables. ## Running Tests @@ -179,21 +180,21 @@ cargo clippy --all-targets Headless control socket smoke tests: ```sh -cargo test --test headless_control -- --ignored -cargo test --features test-apps --test headless_control -- --ignored +cargo test --features e2e --test headless_control +cargo test --features e2e,test-apps --test headless_control ``` WayDriver smoke tests: ```sh -cargo test --features e2e --test waydriver_hearthspace -- --ignored -cargo test --features e2e,test-apps --test waydriver_hearthspace -- --ignored +cargo test --features e2e --test waydriver_hearthspace +cargo test --features e2e,test-apps --test waydriver_hearthspace ``` When debugging AT-SPI discovery, enable WayDriver logs: ```sh -RUST_LOG=waydriver=debug cargo test --features e2e,test-apps --test waydriver_hearthspace -- --ignored --nocapture +RUST_LOG=waydriver=debug cargo test --features e2e,test-apps --test waydriver_hearthspace -- --nocapture ``` ## System Dependencies @@ -228,5 +229,5 @@ systems. a general binary RPC protocol. - Keyboard input maps only the keysyms currently needed by tests. Add mappings as tests require them. -- Ignored E2E tests require surfaceless EGL support. They are not part of the - default `cargo test` run. +- E2E tests require surfaceless EGL support and the Cargo feature `e2e`. They + are not part of the default `cargo test` run. diff --git a/tests/headless_control.rs b/tests/headless_control.rs index 9f0c0d9..c84deab 100644 --- a/tests/headless_control.rs +++ b/tests/headless_control.rs @@ -74,7 +74,6 @@ impl Drop for HeadlessCompositor { } #[test] -#[ignore = "requires surfaceless EGL and the headless compositor socket"] fn headless_control_socket_drives_input_screenshot_and_quit() { let _guard = HEADLESS_TEST_LOCK.lock().expect("headless test lock"); let mut compositor = HeadlessCompositor::spawn(); @@ -103,7 +102,6 @@ fn headless_control_socket_drives_input_screenshot_and_quit() { #[cfg(feature = "test-apps")] #[test] -#[ignore = "requires surfaceless EGL, GTK, and the headless compositor socket"] fn headless_control_socket_spawns_and_drives_real_gtk_client() { let _guard = HEADLESS_TEST_LOCK.lock().expect("headless test lock"); let mut compositor = HeadlessCompositor::spawn_with_size("800x600"); diff --git a/tests/waydriver_hearthspace.rs b/tests/waydriver_hearthspace.rs index 3abd5c7..626fa7a 100644 --- a/tests/waydriver_hearthspace.rs +++ b/tests/waydriver_hearthspace.rs @@ -18,7 +18,6 @@ const SHELL_ACCESSIBLE_NAME: &str = "hearthspace"; static WAYDRIVER_TEST_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(()); #[tokio::test] -#[ignore = "requires surfaceless EGL and the headless compositor socket"] async fn waydriver_backends_drive_input_capture_and_teardown() { init_tracing(); let _guard = WAYDRIVER_TEST_LOCK.lock().await; @@ -58,7 +57,6 @@ async fn waydriver_backends_drive_input_capture_and_teardown() { } #[tokio::test] -#[ignore = "requires surfaceless EGL and shell AT-SPI exposure"] async fn waydriver_session_locates_xilem_shell_by_xpath() -> Result<(), Box> { init_tracing(); @@ -114,7 +112,6 @@ async fn run_xilem_shell_xpath_check() -> Result<(), Box> #[cfg(feature = "test-apps")] #[tokio::test] -#[ignore = "requires surfaceless EGL, GTK, and AT-SPI exposure"] async fn waydriver_session_locates_real_client_by_xpath() { init_tracing(); let _guard = WAYDRIVER_TEST_LOCK.lock().await; -- 2.51.2