fix(ci): run the whole recorder and the e2e tools on the macOS runner

The macOS job named 36 of the recorder's 731 tests by the module paths of its macOS sources. Its
tests are platform-neutral by module but worded in cfg!(target_os = "macos") branches (the options of a
recording, the keys of the viewer, the frames), so a Linux or Windows run takes the other side of
each and only a Mac takes this one, and a filter by name left most of that untested and would go stale
with every module. It runs the whole suite now: it compiles the same test binary the filter needed and
adds about 30 s of tests. In a depth-1 git checkout, as the runner has, all 731 pass (3 skip by design).
The filterset recorder-macos of tools/test-partition is gone with its use.

The test window and the agent of the e2e guests (class tool) have macOS sources (AppKit, the
accessibility API) that no other job compiles, and the tests of the test window's command line ran
nowhere. The job runs their tests and clippy.

With the os_sensitive step before it, every class of tools/test-partition that has macOS tests has a
run on a Mac: the macOS packages (macos-nextest), os_sensitive, the mixed ones (komorebi-client and
komorebi-bar in macos-nextest, the recorder whole) and tool.
This commit is contained in:
LGUG2Z committed 2026-11-06 16:10:03 -08:00
1 parent 5df5c5c3c5
commit 2bbc36c87b
4 files changed
+24 -23

No files matched your search

+4 -3
View File
@@ -133,9 +133,10 @@ justfile and the Nix check sets (`nix/windows/flake-module.nix`) read it, so the
`tools/test-partition check` fails when a member is in no class or in two, when a name is not a member, and when a
`neutral` package is not neutral. `packages CLASS` prints `-p a -p b`; `expr CLASS` prints the nextest filterset
`package(a) | package(b)`. `expr recorder-macos` is the filterset of the recorder tests that run on macOS (the macOS
flavoured modules `sources::oslog`, `av`, `capture::sck`, `platform`, `power`, `system_state`: 36 tests); run it with
`cargo nextest run -p komorebi-recorder -E "$(tools/test-partition expr recorder-macos)"`. `komorebi-bar` has one
`package(a) | package(b)`. The recorder is `mixed`, and its tests are worded in `cfg!(target_os = "macos")` branches
as much as in modules, so a macOS run takes the whole suite (`cargo nextest run -p komorebi-recorder`, 731 tests, about
30 s): a filter of the macOS modules once selected 36 of them and left the macOS side of the rest untested.
`komorebi-bar` has one
Windows-only test and `komorebi-client` Linux-only ones: their jobs name the package with `-p`, the partition says
only that the package is in no platform's default list. `tools/test-partition --self-test` (`just test-partition-check`)
runs `check` on the tree and on deliberately broken copies of the classification.
+1 -11
View File
@@ -4,8 +4,6 @@
# tools/test-partition check fail when the classification and the workspace disagree
# tools/test-partition packages <class> print `-p a -p b` for cargo
# tools/test-partition expr <class> print a nextest filterset: `package(a) | package(b)`
# tools/test-partition expr recorder-macos
# the filterset of the recorder tests that run on macOS
# tools/test-partition --self-test run `check` against the tree and against deliberately broken copies
#
# The classification is tools/test-partition.json (class -> package names); it is the single source of truth
@@ -23,10 +21,6 @@ classes="neutral os_sensitive windows linux macos mixed tool none"
# the crates a `neutral` package must not depend on, directly
platform_crates='["komorebi-windows","komorebi-macos","komorebi-linux"]'
# the tests of the recorder that run on macOS, by their module path: the macOS flavoured sources, which
# the recorder's other tests (the platform-neutral ones) share a binary with
recorder_macos_filter='package(komorebi-recorder) & test(/^(sources::oslog|av|capture::sck|platform|power|system_state)::/)'
die() {
echo "test-partition: $*" >&2
exit 1
@@ -106,10 +100,6 @@ case "$cmd" in
;;
expr)
class=${2:-}
if [ "$class" = recorder-macos ]; then
echo "$recorder_macos_filter"
exit 0
fi
valid_class "$class" || die "unknown class '$class' (one of: $classes)"
members_of "$class" | sed 's/.*/package(&)/' | paste -sd'|' - | sed 's/|/ | /g'
;;
@@ -117,7 +107,7 @@ case "$cmd" in
exec "$root/tools/test-partition.test" "$root/tools/test-partition"
;;
*)
sed -n '2,9p' "$0" | sed 's/^# \{0,1\}//' >&2
sed -n '2,7p' "$0" | sed 's/^# \{0,1\}//' >&2
exit 2
;;
esac