Files
littlefs/scripts
Christopher Haster 95fddd3c18 scripts: runners: Renamed a bunch of flags
Mainly to make space for some planned bench flags, while also preferring
"step" over "period" (for consistency), and "runfreq" over "freq" (to
differentiate from "simfreq" in the future).

In runners:

- -s/--step -> --step
- --trace-period -> --trace-step
- --trace-freq -> --trace-runfreq

In scripts:

- --record -> -e/--record
- --perf-period -> --perf-step
- --perf-freq -> --perf-runfreq
- --include -> -i/--include

---

One thing that makes this work is the new sys.argv regex trick, where we
try to predict what mode the script will run in by prematching known
mode-switch flags before handing things off to argparse.

Note:

- Hiding flags from argparse risks confusing help-text, so we include
  all flags if we see -h/--help in sys.argv.

  This doesn't work for the help-text printed if argparse errors, but we
  can only do so much. Maybe argparse only showing relevant flags for
  the given mode is ok?

- We use -[^-]*[hf].* for shortform flags, which should also match
  multiple shortform flags in a single arg (-fhfhfh).

- This requires the conflict_handler='ignore' hack to work, but these
  scripts already needed it anyways.
2026-03-09 22:54:51 -05:00
..
2025-04-16 15:23:06 -05:00