Run both GTK tests and give them a display in CI; two small fixes #1

Merged
SkyfaR merged 3 commits from gtk-tests-ci-display into main 2026-09-30 12:36:45 +02:00
Owner

Three small, independent commits.

Name the maintainer and the Forgejo repository in the PKGBUILD

Replaces the placeholder maintainer line and the placeholder GitHub URL, and ticks the item off the roadmap.

Let the analyze test pass on btrfs mounted with compression

analyze::tests::analyzes_directory expected more than 900 KiB of savings for 1 MiB of zeros. Where the temporary directory is on btrfs mounted with compress=, the zeros are compressed as they are written, analyze correctly reports hardly any savings, and the test failed. That is the case for TMPDIR on such a drive and for containers whose storage is on one. Only the assertion changes: data in compressed extents counts towards the expected total.

Run both GTK tests, and give them a display in CI

GTK can only be initialised on one thread, but every test runs on its own. Of the two tests of the confirmation step (the data-loss confirmation and the START button regression), the one that came second failed to initialise GTK, printed "skipping: no display" and passed without checking anything; with --test-threads=1 it panicked instead. Both now run their body on one shared thread.

CI starts a headless Broadway display for the test step. With OGC_TEST_REQUIRE_DISPLAY set, a missing display is a failure, so the GTK tests cannot silently skip there.

Testing

  • cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings, cargo test --locked: green locally.
  • The check job of ci.yml was run step by step in a fresh archlinux:latest container: all four steps exit 0, and both GTK tests ran on Broadway there.
  • Each GTK test fails when the behaviour it guards is broken on purpose.
  • Not covered locally: the package job, and the real Forgejo runner. This pull request is the first run of the changed workflow there.
Three small, independent commits. ## Name the maintainer and the Forgejo repository in the PKGBUILD Replaces the placeholder maintainer line and the placeholder GitHub URL, and ticks the item off the roadmap. ## Let the analyze test pass on btrfs mounted with compression `analyze::tests::analyzes_directory` expected more than 900 KiB of savings for 1 MiB of zeros. Where the temporary directory is on btrfs mounted with `compress=`, the zeros are compressed as they are written, `analyze` correctly reports hardly any savings, and the test failed. That is the case for `TMPDIR` on such a drive and for containers whose storage is on one. Only the assertion changes: data in compressed extents counts towards the expected total. ## Run both GTK tests, and give them a display in CI GTK can only be initialised on one thread, but every test runs on its own. Of the two tests of the confirmation step (the data-loss confirmation and the START button regression), the one that came second failed to initialise GTK, printed "skipping: no display" and passed without checking anything; with `--test-threads=1` it panicked instead. Both now run their body on one shared thread. CI starts a headless Broadway display for the test step. With `OGC_TEST_REQUIRE_DISPLAY` set, a missing display is a failure, so the GTK tests cannot silently skip there. ## Testing - `cargo fmt --check`, `cargo clippy --all-targets --locked -- -D warnings`, `cargo test --locked`: green locally. - The `check` job of `ci.yml` was run step by step in a fresh `archlinux:latest` container: all four steps exit 0, and both GTK tests ran on Broadway there. - Each GTK test fails when the behaviour it guards is broken on purpose. - Not covered locally: the `package` job, and the real Forgejo runner. This pull request is the first run of the changed workflow there.
The PKGBUILD still carried the placeholder maintainer line and a
placeholder GitHub URL.
The test writes 1 MiB of zeros and expected more than 900 KiB of
estimated savings. Where the temporary directory is on btrfs mounted
with compress=, the zeros are compressed as they are written, analyze
correctly reports hardly any savings, and the test failed. That is
the case for TMPDIR on such a drive, and for containers whose storage
is on one.

Data in compressed extents now counts towards the expected total.
Run both GTK tests, and give them a display in CI
Some checks failed
CI / Format, lint and test (pull_request) Successful in 1m56s
CI / Arch package (pull_request) Successful in 2m40s
CI / Arch package (push) Has been cancelled
CI / Format, lint and test (push) Has been cancelled
76581819be
GTK can only be initialised on one thread, but every test runs on its
own. Of the two tests of the confirmation step, the one that came
second failed to initialise GTK, reported "no display" and passed
without checking anything; with --test-threads=1 it panicked instead.
Both now run their body on one shared thread.

CI starts a headless Broadway display for the tests. With
OGC_TEST_REQUIRE_DISPLAY set, a missing display is a failure, so the
GTK tests cannot silently skip there.
SkyfaR merged commit 76581819be into main 2026-09-30 12:36:45 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LevelXStudios/OpenGameCompressor!1
No description provided.