forked from Imagelibrary/littlefs
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user