test(linux): distinguish PPA operands from command options #2652

Merged
mooki000 merged 1 commit from test/docker-ppa-options into main 2026-11-12 04:30:06 +00:00
mooki000 commented 2026-11-12 04:23:58 +00:00 (Migrated from github.com)

What this is for: restore the Docker/CI repository comparison without mistaking an option for a PPA (current main CI). What is measured: the affected game-free check before and after, with GCC 16.2.1 and Clang 23.1.3 selected, plus one strict full-suite run, as recorded below. This check is Python-only; the two environment runs do not claim compiler coverage. Not measured: a game run or Windows execution.

Cause

#1936 added ppas() after #2275 had already put -y --no-update before the workflow's PPA; its optional--y pattern captures --no-update instead of the operand (tests/test_linux_docker_packages.py, .github/workflows/linux-appimage.yml).

The relevant failure in main's CI log is:

AssertionError: Items in the first set but not the second:
'ppa:ubuntu-toolchain-r/test'
Items in the second set but not the first:
'--no-update'

What changed

Skip command options and join continued lines before extracting the repository; retain exact Docker/workflow equality, require the known workflow PPA, and cover flag ordering, no flags, continuations and no command in the same test.

How it was tested

Recorded on 2026-11-11, Linux kernel 7.2.15-1-omarchy, base de866017, head bf832f1e (version and test records).

  • Untouched main a016b7a6: the affected check fails independently in both compiler environments with the diagnostic above; the branch passes independently in both (python -I -B tests/run_all.py --strict --jobs 1 tests/test_linux_docker_packages.py records).
  • An isolated mutation changes only the Docker PPA to a different repository: the repaired comparison fails in both environments (two mutation records), so repository drift is still detected.
  • One full python -I -B tests/run_all.py --strict: 456 passed, 14 failed, 20 skipped in 145 s (linux, 32 at once), load 26.92 → 33.42 (complete suite output).
  • That run's remaining failures are: test_wayland_libdecor_hint.py, test_display_startup_failure.py, test_texel_buffer_ownership.py, test_audio_aux.py, test_audio_biquad.py, test_dlss_checks.py, test_env_on.py, test_framegen_preset.py, test_hdr_encode.py, test_menu_i18n.py, test_mods_size_table.py, test_mouse_native.py, test_readback_part.py, test_rumble_menu.py (complete suite output). The companion fixture, capture-switch, camera-handover and hint-catalog branches address their separate causes; #2614 owns the HDR check and is not duplicated here.

Not tested / risks

Only the test parser changes; no Docker build, package installation or repository enrollment was run.

Overlaps

No open pull request touches this test in the recorded file-overlap search.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra [email protected]

**What this is for:** restore the Docker/CI repository comparison without mistaking an option for a PPA ([current main CI](https://github.com/NotRexed/Hookshot/actions/runs/43151254256)). **What is measured:** the affected game-free check before and after, with GCC 16.2.1 and Clang 23.1.3 selected, plus one strict full-suite run, as recorded below. This check is Python-only; the two environment runs do not claim compiler coverage. **Not measured:** a game run or Windows execution. ## Cause #1936 added `ppas()` after #2275 had already put `-y --no-update` before the workflow's PPA; its optional-`-y` pattern captures `--no-update` instead of the operand (`tests/test_linux_docker_packages.py`, `.github/workflows/linux-appimage.yml`). The relevant failure in [main's CI log](https://github.com/NotRexed/Hookshot/actions/runs/43151254256) is: ```text AssertionError: Items in the first set but not the second: 'ppa:ubuntu-toolchain-r/test' Items in the second set but not the first: '--no-update' ``` ## What changed Skip command options and join continued lines before extracting the repository; retain exact Docker/workflow equality, require the known workflow PPA, and cover flag ordering, no flags, continuations and no command in the same test. ## How it was tested Recorded on 2026-11-11, Linux kernel `7.2.15-1-omarchy`, base `de866017`, head `bf832f1e` (version and test records). - Untouched main `a016b7a6`: the affected check fails independently in both compiler environments with the diagnostic above; the branch passes independently in both (`python -I -B tests/run_all.py --strict --jobs 1 tests/test_linux_docker_packages.py` records). - An isolated mutation changes only the Docker PPA to a different repository: the repaired comparison fails in both environments (two mutation records), so repository drift is still detected. - One full `python -I -B tests/run_all.py --strict`: **`456 passed, 14 failed, 20 skipped in 145 s (linux, 32 at once)`**, load 26.92 → 33.42 (complete suite output). - That run's remaining failures are: `test_wayland_libdecor_hint.py`, `test_display_startup_failure.py`, `test_texel_buffer_ownership.py`, `test_audio_aux.py`, `test_audio_biquad.py`, `test_dlss_checks.py`, `test_env_on.py`, `test_framegen_preset.py`, `test_hdr_encode.py`, `test_menu_i18n.py`, `test_mods_size_table.py`, `test_mouse_native.py`, `test_readback_part.py`, `test_rumble_menu.py` (complete suite output). The companion fixture, capture-switch, camera-handover and hint-catalog branches address their separate causes; #2614 owns the HDR check and is not duplicated here. ## Not tested / risks Only the test parser changes; no Docker build, package installation or repository enrollment was run. ## Overlaps No open pull request touches this test in the recorded file-overlap search. Assisted-by: GPT-6 Astra Co-Authored-By: GPT-6 Astra <[email protected]>
hckrman101 (Migrated from github.com) approved these changes 2026-11-12 04:27:29 +00:00
hckrman101 (Migrated from github.com) left a comment

Looks good. I checked the new ppas() against both real call sites on main: the Dockerfile has add-apt-repository -y ppa:... and the workflow has timeout --kill-after=5s 180s add-apt-repository -y --no-update ppa:.... (?:-\S+\s+)*(\S+) skips any run of short or long options in any order and captures the operand in both. Joining \-continued lines first mirrors what installs() already does. A real drift is still caught: test_ppas compares the two sets exactly, and the new assertIn on the workflow's PPA means a regex that finds nothing in both files can no longer pass as equal-empty. test_ppa_options covers no flags, -y, --no-update, both orders, a continuation and no command.

Overlap: #1936 (which added ppas()) is already merged, so there is nothing to coordinate. No open PR touches this file.

Nit, no action needed: an option that takes a separate argument (e.g. -s deb) would be read as the operand, but neither file uses one.

CI is still running as I write. The known main failures (test_env_on, test_menu_i18n, test_hdr_encode, test_mouse_native, and on Windows test_psychov35 / test_pcache_header_read) are not this PR's.

Looks good. I checked the new `ppas()` against both real call sites on main: the Dockerfile has `add-apt-repository -y ppa:...` and the workflow has `timeout --kill-after=5s 180s add-apt-repository -y --no-update ppa:...`. `(?:-\S+\s+)*(\S+)` skips any run of short or long options in any order and captures the operand in both. Joining `\`-continued lines first mirrors what `installs()` already does. A real drift is still caught: `test_ppas` compares the two sets exactly, and the new `assertIn` on the workflow's PPA means a regex that finds nothing in both files can no longer pass as equal-empty. `test_ppa_options` covers no flags, `-y`, `--no-update`, both orders, a continuation and no command. Overlap: #1936 (which added `ppas()`) is already merged, so there is nothing to coordinate. No open PR touches this file. Nit, no action needed: an option that takes a separate argument (e.g. `-s deb`) would be read as the operand, but neither file uses one. CI is still running as I write. The known main failures (test_env_on, test_menu_i18n, test_hdr_encode, test_mouse_native, and on Windows test_psychov35 / test_pcache_header_read) are not this PR's.
Commenting is not possible because the repository is archived.
No description provided.