Skip to content

Keep shell tests inside their fixtures - #6763

Merged
dhh merged 1 commit into
omacom:quattrofrom
yashranaway:test/isolate-shell-fixtures
Aug 16, 2026
Merged

dhh merged 1 commit into
omacom:quattrofrom
yashranaway:test/isolate-shell-fixtures

Conversation

@yashranaway

@yashranaway yashranaway commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

The shell tests should not depend on the machine that happens to run them. These two fixtures were still borrowing state from an installed Omarchy environment.

<<< AI wording below >>>

Problem

Two shell tests only passed reliably when launched from an already configured Omarchy session:

  • the bar fixture inherited OMARCHY_PATH, so it failed when that runtime variable was absent and could read defaults from the installed tree when it pointed elsewhere
  • the clamshell fixture never stubbed omarchy-hyprland-monitor-laptop, so it called the host detector and based its fake-monitor assertions on real hardware

This made clean-VM runs fail while Omarchy-hosted runs could hide the fixture gaps.

Fix

Point the bar fixture at the checkout it is testing, and make the clamshell fixture return its declared fake laptop panel.

Runtime code is unchanged.

Verification

  • env -u OMARCHY_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin bash test/shell.d/bar-test.sh
  • env -u OMARCHY_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin bash test/shell.d/monitor-clamshell-scale-test.sh
  • bash -n test/shell.d/bar-test.sh test/shell.d/monitor-clamshell-scale-test.sh
  • git diff --check

Copilot AI balanced review requested due to automatic review settings August 12, 2026 17:23

Copilot AI 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.

Pull request overview

Makes shell tests independent of the host Omarchy installation.

Changes:

  • Points bar defaults at the repository checkout.
  • Stubs laptop-monitor detection with the fixture’s eDP-1 display.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/shell.d/bar-test.sh Sets fixture-local OMARCHY_PATH.
test/shell.d/monitor-clamshell-scale-test.sh Adds deterministic laptop-monitor detection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dhh
dhh merged commit a3de80d into omacom:quattro Aug 16, 2026
@yashranaway
yashranaway deleted the test/isolate-shell-fixtures branch August 16, 2026 20:28
torturado pushed a commit to torturado/omarchy that referenced this pull request Aug 19, 2026
jnadeau207-collab pushed a commit to jnadeau207-collab/omarchy-7-ultimate that referenced this pull request Aug 26, 2026
nick1udwig pushed a commit to nick1udwig/omarchy that referenced this pull request Sep 9, 2026
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants