Simplified test/bench suite finding logic in test.py/bench.py

These just take normal paths now, we weren't even using the magic
test/bench suite finding logic since it's easier to just pass everything
explicitly in our Makefile.

The original test/bench suite finding logic was a bad idea anyways. This
is what globs are for, and having custom path chasing logic is
inconsistent and risks confusion.
This commit is contained in:
Christopher Haster
2024-02-14 00:25:10 -06:00
parent a124ee54e7
commit 06a360462a
2 changed files with 4 additions and 32 deletions

View File

@@ -13,7 +13,6 @@ import collections as co
import csv
import errno
import fnmatch
import glob
import itertools as it
import math as m
import os
@@ -265,20 +264,8 @@ class TestSuite:
def compile(test_paths, **args):
# find .toml files
paths = []
for path in test_paths:
if os.path.isdir(path):
path = path + '/*.toml'
if '*' in path:
for path in glob.glob(path):
paths.append(path)
else:
paths.append(path)
# load the suites
suites = [TestSuite(path, args) for path in paths]
suites = [TestSuite(path, args) for path in test_paths]
# sort suites by:
# 1. topologically by "after" dependencies
@@ -1653,8 +1640,7 @@ if __name__ == "__main__":
comp_parser.add_argument(
'test_paths',
nargs='*',
help="Description of *.toml files to compile. May be a directory "
"or a list of paths.")
help="Set of *.toml files to compile.")
comp_parser.add_argument(
'-c', '--compile',
action='store_true',