Skip to content

ci: Put ci/ on PYTHONPATH for the Qt lane's unittest command - #2330

Merged
zackees merged 2 commits into
masterfrom
ci/qt-unittest-path
Oct 25, 2026
Merged

zackees merged 2 commits into
masterfrom
ci/qt-unittest-path

Conversation

@zackees

@zackees zackees commented Oct 25, 2026

Copy link
Copy Markdown
Member

Master is red on the Qt Frontend Linux lane. #2311 removed every sys.path edit. ci/linux_qt_frontend.sh runs uv run python -m unittest ci.test_shared_qt_platform… from the repo root, and those modules import their siblings by bare name (platform_ifdef_ratchet, test_settings_platform_facade). Every frontend PR now fails:

ModuleNotFoundError: No module named 'platform_ifdef_ratchet'
FAILED (errors=5)

Example: run 40154872819 on #2313.

Fix

ci/linux_qt_frontend.sh sets PYTHONPATH=ci on that one command. The workflows already run ci_lint this way. No sys.path edit is added back.

Tests

  • RED (ci: Test that the Qt lane's unittest…): ci/test_qt_frontend_unittest_imports.py extracts the script's own unittest command and runs it with an empty OBS_QT_TEST_PREFIX, so the real-Qt cases skip. It fails on master with the same ModuleNotFoundError.
  • GREEN: passes. All the modules load, and each real-Qt case skips without a prefix.
  • ./lint passes.

This is a focused CI fix, so RED and GREEN are pushed together, as coordination.md §4 allows.

Since #2311 no test puts ci/ on sys.path, so the Qt Frontend Linux lane's
'python -m unittest ci.test_...' fails with ModuleNotFoundError:
platform_ifdef_ratchet on every frontend PR.
The real-Qt tests import their ci/ siblings (platform_ifdef_ratchet,
test_settings_platform_facade) by name, which #2311 left to the caller.
Fixes the Qt Frontend Linux lane on every frontend PR.

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Coordinator review: LGTM. Fixes the master Qt lane red (run 40154786188, ModuleNotFoundError: No module named 'platform_ifdef_ratchet') with a scoped PYTHONPATH=ci, no sys.path edits back. RED test extracts the script's real command, so it can't drift. Focused CI fix, RED+GREEN pushed together per coordination.md §4. Not queued yet: checks shows 2 jobs still running; next tick queues it once they finish green.

@zackees
zackees enabled auto-merge October 25, 2026 03:11
@zackees
zackees added this pull request to the merge queue Oct 25, 2026
Merged via the queue into master with commit 859f43c Oct 25, 2026
30 checks passed
@zackees
zackees deleted the ci/qt-unittest-path branch October 26, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant