From f83d7227c87a0293dc715fc4667a76b7479d627c Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sat, 9 Dec 2023 14:29:45 +0100 Subject: test: Accept test names as arguments --- test/RegressTests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/RegressTests.py b/test/RegressTests.py index 47abc3d0..1804d32e 100755 --- a/test/RegressTests.py +++ b/test/RegressTests.py @@ -27,6 +27,10 @@ args = parser.parse_args() multiproc &= (args.jobs >= 1) harness = LedgerHarness(args.ledger, args.sourcepath, args.verify, args.gmalloc, args.python) +match = re.match(r'(Baseline|Regress|Manual)Test_(.*)', str(args.tests)) +if match: + args.tests = pathlib.Path('test') / match.group(1).lower() / (match.group(2) + '.test') + if not args.tests.is_dir() and not args.tests.is_file(): print(f'{args.tests} is not a directory or file (cwd: {os.getcwd()})' , file=sys.stderr) -- cgit v1.2.3