tools: tester-report.sh for scrubbed logs and report bodies #312
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/312"
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 m0rff on 2026-11-27T10:58:20Z.
Refs #309
tools/macos/tester-report.sh [--out DIR] [log](newestruns/*/victory.logby default):hostname,scutilComputerName/LocalHostName/HostName) replaced by<home>,<user>,<host>. Replacement is literal and stops at word boundaries, so a short user name doesn't mangle other words. The original log is not changed.~/victory-reports/(or--out; refuses a folder inside the repo) and prints its path and sha256.--help.Test:
tools/macos/tests/tester-report.sh, added to the macos-scripts job. It uses a synthetic log with a fake home, user and host names and stubssysctl,sw_vers,scutil,hostnameandidon PATH. It checks that none of the fake values survive in the .gz or the body, that every template label appears as a section, that the printed sha256 matches, that the original log is unchanged, and that an in-repo--outis refused. It fails when scrubbing is disabled.Ran locally:
cargo xtask policy, plus the three script tests under /bin/bash 3.2.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T11:54:49Z.
Thank you, this is useful and the test is good (the fake names must not survive, and it fails when scrubbing is off).
One thing to add in a follow-up, not before the merge: the README says what is replaced (home folder, user name, the Mac's names). Please add that paths outside the home folder (for example an external disk named after you) are not changed, so people read the file before they attach it. Merged.