tools: test run-native.sh's argument checks, and refuse --console=-x (#580) #581
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/581"
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:03:14Z.
What this changes
Refs #580.
run-native.sh's 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. All of those paths exist and none was tested (console-default.shcovers only the RAM-to-model rule).--console -his refused, because the next word starts with-and is therefore a switch, not a model.--console=-hwas accepted and handed to the game as the model, so a forgotten model surfaced as the game's own parser error. Both forms now answer the same way.tools/macos/tests/run-native-args.shpins every check above: the usage paths, each refused value, a path that is not a file, a folder holding nogame_*master.exe, and a folder holding a file of the wrong name. Each case asserts both the exit status (2, or 0 for--help) and the message. Every case stops before a game would be launched, so it needs no game and no build.macos-scriptsCI job, beside the other script tests.The two "no executable" cases are exactly what a partial download or the wrong folder produces, which is the most common way a first run fails.
How it was tested
/bin/bash tools/macos/tests/run-native-args.sh→run-native arguments: ok.macos-scriptstests, run asci.ymlruns them:target-directory.sh,console-default.sh,verify-target.sh,verify-msc.sh,msc-check.sh,tester-report.sh,run-summary-compare.sh,run-summary.sh --self-test,tools/corpus/compare.sh --self-test— all pass.cargo xtask policy: 399 files ok.ci.ymlparses, and the new step sits in themacos-scriptsjob.No game_*master.exe found in /Volumes/…, exit 2, nothing launched.game_scarlett_master.exe.Checklist
VICTORY_*variable and documented: none addedImported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:26:10Z.
Rebased onto current main (ci.yml step list conflicted with the rustup-path test step; both kept). Bash test, cargo tests, clippy (windows target, --locked, -D warnings) and cargo xtask policy all pass locally.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.