From 1ac3aae92b7e1b063d387f856647c488f3745942 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Mon, 31 Mar 2025 16:21:05 -0500 Subject: [PATCH] scripts: test.py/bench.py: Added -e/--exec shortform flag Why not, -e/--exec seems useful/general purpose enough to deserve a shortform flag. Especially since much of our testing involves emulation. The only risk of conflicts is with -e/--error-* in other scripts, but the _whole point_ of test.py is to error on failure, so I don't think this will be an issue. Note that -E may be more useful for environment variables in the future. I feel like -e/--exec was more common in other programs, but I've only found sed -e and perl -e so far. Most programs stick to -c/--command (bash, python) which would conflict with -c/--compile here. --- scripts/bench.py | 2 +- scripts/test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bench.py b/scripts/bench.py index f997f367..5b5c9d5e 100755 --- a/scripts/bench.py +++ b/scripts/bench.py @@ -1667,7 +1667,7 @@ if __name__ == "__main__": help="Path to the gdb executable, may include flags. " "Defaults to %r." % GDB_PATH) bench_parser.add_argument( - '--exec', + '-e', '--exec', type=lambda e: e.split(), help="Run under another executable.") bench_parser.add_argument( diff --git a/scripts/test.py b/scripts/test.py index 88466922..f874f1a9 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -1696,7 +1696,7 @@ if __name__ == "__main__": help="Path to the gdb executable, may include flags. " "Defaults to %r." % GDB_PATH) test_parser.add_argument( - '--exec', + '-e', '--exec', type=lambda e: e.split(), help="Run under another executable.") test_parser.add_argument(