Skip to content

progress_dashboard: --tests without --run-tests is the usage error, not a silent no-op - #10

Open
GustawMatuszewski wants to merge 1 commit into
ProjectLeonidaL:mainfrom
GustawMatuszewski:tools/progress-dashboard-tests-requires-run-tests
Open

GustawMatuszewski wants to merge 1 commit into
ProjectLeonidaL:mainfrom
GustawMatuszewski:tools/progress-dashboard-tests-requires-run-tests

Conversation

@GustawMatuszewski

Copy link
Copy Markdown

Claimed in the coordination issue as: n/a — this repository has no "Coordinating who works on what" issue, so the item is described here in full.

Depends on: none.

What and why

--tests is only read inside the --run-tests branch, so python -I tools/progress_dashboard.py --out <dir> --tests test_boot_trace exits 0 and writes a dashboard without running the requested tests — the filter silently does nothing — and an invalid --tests regular expression is diagnosed only once tests actually run.

The combination is now a usage error before anything is written:

progress_dashboard.py: error: --tests requires --run-tests

tests/test_progress_dashboard.py gains test_tests_without_run_tests_is_an_argument_error: exit 2, the message, no traceback and no output folder, for a plain filter and for an invalid one. It fails on main (exit 0, dashboard written) and passes with the change.

Tested

  • python -I tests/test_progress_dashboard.py — 51 tests, 0 failures.
  • python -I tools/progress_dashboard.py --out /tmp/pd_out --tests x → exit 2 with the message above, no folder written.

GPUs tested: n/a (no GPU test).

AI-assisted: yes (Claude Code). No game files.

Checklist

  • Based on current main (6591ba9), one commit, merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • No new translator rule.

…ot a silent no-op

`--tests` is only read inside the `--run-tests` branch, so `--tests test_boot_trace`
on its own exited 0 and wrote a dashboard without running the requested tests, and
an invalid `--tests` regular expression was diagnosed only once tests actually ran.
Refuse the combination before anything is written.

tests/test_progress_dashboard.py: the new case checks exit 2, the message, no
traceback and no output folder, for a plain filter and for an invalid one.

python -I tests/test_progress_dashboard.py: 51 tests, 0 failures.
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.

1 participant