Skip to content

Share the QML fixture and scratch-shell test harnesses - #16339

Merged
ryanrhughes merged 13 commits into
quattrofrom
t3/shared-test-harnesses
Oct 27, 2026
Merged

ryanrhughes merged 13 commits into
quattrofrom
t3/shared-test-harnesses

Conversation

@ryanrhughes

@ryanrhughes ryanrhughes commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #16336 (t3/prune-live-session-tests), since both touch the same spot in base-test.sh. Moves two copy-pasted harnesses into base-test.sh.

  • run_qml_fixture: replaces the same ~60-line launch, poll and jq runner in eleven QML fixture tests, lock-autorepeat included. It clears the previous result and stops the previous Quickshell first, so a second fixture in one file can't pass on the first one's result. lock-password-overflow folds into the fingerprint-indicator fixture, which already asserted the stricter fit; its three scale checks move over.
  • setup_scratch_shell and friends: replace the ~100-line scratch-shell harness in the budget and smoke tests.
  • Budgets: no budget value changes.
    • login-to-desktop-budget duplicated bar-startup-budget's 750 ms budget and endpoint, so it is deleted. bar-startup-budget now starts through omarchy-launch-shell, as login does.
    • lock-appear-budget's two single cold samples are now the fastest of three, so a regression that slows only some cold starts can now pass.
  • runtime-smoke: drops its hard-coded widget list and center-section ordering for a check derived from shell.json: every default widget gets a slot in the section it names, whatever shows has a real size, and the menu, workspaces and clock always show. Its ping loop used -q, which never actually waited.
  • Docs: docs/testing.md describes both helpers and lists bar-startup-budget, lock-appear-budget, menu-open-budget and panel-open-budgets under Performance guards.

runtime-smoke still fails "each widget registers its IPC handler once per screen" on a three-screen machine, the same way on the base commit.

Migrations run once per machine and are frozen once they ship, so their tests
stop guarding anything. Drop the migration test files and the migration blocks
inside other tests, and update the testing docs to say migrations get no suite
test.
They read the developer's real screen with grim and skip whenever a window
is open; one dispatches DPMS and another nests Hyprland and moves the real
pointer. Checks like these belong in the acceptance VM. Drop the
require_uncovered_background helper only they used.
…word overflow check into the fingerprint indicator fixture
…ts, and time login through the launcher in the bar startup budget
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes affect shell-test setup and assertions, not the shell's runtime behavior.

Fix the remaining old harness names in runtime-smoke-test.sh before merging.

Findings

  1. P1 Old names stop smoke tests ▶

Summary

Moves repeated Quickshell setup into two shared test harnesses.

  • QML fixture checks now use one shared runner.
  • Scratch-shell tests now share setup, IPC, and cleanup helpers.
  • Startup and lock budgets now measure the paths they are meant to guard.
  • Runtime smoke checks now follow the configured bar layout.

Reviews (3) · Last reviewed commit: "Keep runtime-smoke's collision listing f..." · Reviewed by Greptile

Comment thread test/shell.d/runtime-smoke-test.sh Resolved
@omarchybot omarchybot added the enhancement New feature or request label Oct 22, 2026

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

# Conflicts:
#	test/shell.d/default-agent-test.sh
…er than reading the screen

It loads the real LockView offscreen and checks that held Return and Escape are dropped while Backspace and Delete still repeat. Nothing else covers that predicate.
The section check alone passes a widget that renders hidden or at zero size. Whatever shows must have a size, and the menu, workspaces and clock must show.
A second run_qml_fixture in one file read the first fixture's result and passed without waiting for its own.
@ryanrhughes
ryanrhughes changed the base branch from t3/prune-live-session-tests to quattro October 27, 2026 04:44
With more than 20 collisions, head closed the pipe and pipefail killed the test before it reported the failure.
@ryanrhughes
ryanrhughes merged commit 3138acf into quattro Oct 27, 2026
2 checks passed
cp -a "$ROOT/shell" "$test_root/shell"
ln -s "$ROOT/config" "$test_root/config"
ln -s "$ROOT/bin" "$test_root/bin"
setup_scratch_shell

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Old names stop smoke tests

The scratch-shell migration leaves the later config tests using test_home, QS_PID, TMPDIR and shell_ipc, which are no longer defined. When the test reaches line 582, set -u stops it with test_home: unbound variable, skipping the remaining checks. Update the whole block to use the shared harness names.

omarchybot added a commit that referenced this pull request Nov 1, 2026
quattro moved nine of the tests this branch changed onto the shared run_qml_fixture harness in base-test.sh (#16339), and deleted lock-password-overflow-test.sh and screenshot-sanity-test.sh. Those files now match quattro, and the fix moves into the harness instead: run_qml_fixture starts Quickshell under setsid, and both its re-run and qml_fixture_cleanup stop the whole group with stop_process_group, so every run_qml_fixture test is covered at once. tray-menu-test.sh still starts its own shell and keeps the per-test fix. The scratch-shell tests, input-devices-test.sh and shell-idle-spawn-test.sh already stop their own children.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to scottjones/omarchy-mx-mac that referenced this pull request Nov 1, 2026
quattro moved the smoke test's shell copy into setup_scratch_shell (omacom#16339), so the platform-root rewrite now runs on $SCRATCH_ROOT/shell right after it, with the fixture under $SCRATCH_DIR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to Jabril-Mahamud/omarchy that referenced this pull request Nov 1, 2026
quattro's shared scratch-shell harness (omacom#16339) renamed shell_ipc to scratch_ipc in runtime-smoke-test.sh, which conflicted with the stock widget summon probe; the probe now calls scratch_ipc like its neighbours.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants