tools/tinytest-codegen.py: Add command-line option to exclude tests.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -108,9 +108,12 @@ argparser = argparse.ArgumentParser(
|
|||||||
description="Convert native MicroPython tests to tinytest/upytesthelper C code"
|
description="Convert native MicroPython tests to tinytest/upytesthelper C code"
|
||||||
)
|
)
|
||||||
argparser.add_argument("--stdin", action="store_true", help="read list of tests from stdin")
|
argparser.add_argument("--stdin", action="store_true", help="read list of tests from stdin")
|
||||||
|
argparser.add_argument("--exclude", action="append", help="exclude test by name")
|
||||||
args = argparser.parse_args()
|
args = argparser.parse_args()
|
||||||
|
|
||||||
if not args.stdin:
|
if not args.stdin:
|
||||||
|
if args.exclude:
|
||||||
|
exclude_tests += tuple(args.exclude)
|
||||||
for group in test_dirs:
|
for group in test_dirs:
|
||||||
tests += [test for test in glob("{}/*.py".format(group)) if test not in exclude_tests]
|
tests += [test for test in glob("{}/*.py".format(group)) if test not in exclude_tests]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user