mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-26 17:18:26 +00:00
Tweaked test/bench id globbing to avoid duplicating cases
Before, globs that match both the suite name and case name would cause
end up running the case twice. Which is a bit of a problem, since all
cases contain their suite name as a prefix...
test_f* => run test_files
|-> run test_files_hello
|-> run test_files_trunc
...
run test_files_hello
run test_files_trunc
...
Now we only run matching test cases if no suites were found.
This has the side-effect of making the universal glob, "*", equivalent
to no test ids, which is nice:
$ ./scripts/test.py -j -b '*' # equivalent
$ ./scripts/test.py -j -b #
This is useful for running a specific problematic test first before
running the all of the tests:
$ ./scripts/test.py -j -b test_files_trunc '*'
This commit is contained in:
@@ -833,9 +833,10 @@ def find_ids(runner, test_ids=[], **args):
|
||||
test_ids__.extend(suite
|
||||
for suite in expected_suite_perms.keys()
|
||||
if fnmatch.fnmatch(suite, name))
|
||||
test_ids__.extend(case_
|
||||
for case_ in expected_case_perms.keys()
|
||||
if fnmatch.fnmatch(case_, name))
|
||||
if not test_ids__:
|
||||
test_ids__.extend(case_
|
||||
for case_ in expected_case_perms.keys()
|
||||
if fnmatch.fnmatch(case_, name))
|
||||
# literal suite
|
||||
elif name in expected_suite_perms:
|
||||
test_ids__.append(id)
|
||||
|
||||
Reference in New Issue
Block a user