tools: run-native.sh's argument checks and missing-game paths have no test, and its two --console forms disagree #580
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T10:02:57Z.
What
tools/macos/run-native.shis what every tester and every agent runs, and its first job is refusing bad input clearly: no argument, two targets,--secondswithout a value or with a non-number, a value past the timer range,--consolewithout a model, a path that is not a file, and a folder whose download does not holdgame_*master.exeyet. Every one of those paths exists, and none is covered by a test —console-default.shcovers only the RAM-to-model rule inside it.Writing the test turned up one real inconsistency:
--console -his refused ("requires a model", because the next word starts with-), but--console=-hwas accepted and passed to the game as the model, so a forgotten model showed up as the game's own parser error instead of this script's message.What this changes
--console=<value>refuses a value starting with-, the same rule the space form already applies, so both forms answer the same way.tools/macos/tests/run-native-args.shpins all of the checks above, without a game and without building: every case stops before the game is launched, and the two "no executable" cases are exactly what a partial download or the wrong folder produces.macos-scriptsCI job, next to the other script tests.How it was tested
/bin/bash tools/macos/tests/run-native-args.sh: passes, and each case asserts both the exit status (2, or 0 for--help) and the message.macos-scriptstests still pass, run asci.ymlruns them.cargo xtask policy: 399 files ok.No game_*master.exe found in /Volumes/…, exit 2, nothing launched.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T10:02:58Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T10:03:08Z.
Claimed by @AnastasisKon. Open a draft pull request with
Refs #580in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:37:20Z.
/release - done: PR #581 tests run-native.sh's argument checks and refuses
--console=-x. Carried in my fork'smain(69146296). Note the PR itself now shows CONFLICTING against upstream; that is only upstream-facing, the commit is in my fork intact.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:42:51Z.
/release - done: PR #581 tests run-native.sh's argument checks and refuses
--console=-x. Carried in my fork'smain(69146296). Note the PR itself now shows CONFLICTING against upstream; that is only upstream-facing, the commit is in my fork intact.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T12:43:05Z.
Released. This issue is free to claim.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T17:15:50Z.
Already in the tree:
tools/macos/tests/run-native-args.shexists and runs in themacos-scriptsjob, and--console=refuses a value starting with-(run-native.sh:25-30). Closing.