This allows to run the testsuite over a subset of test cases, e.g. like so: | ./nft-test.py bridge/*.t Signed-off-by: Phil Sutter <phil@xxxxxx> --- tests/py/nft-test.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py index 8a82a80adb1de..d5cb25b389de5 100755 --- a/tests/py/nft-test.py +++ b/tests/py/nft-test.py @@ -1078,8 +1078,8 @@ def run_test_file(filename, force_all_family_option, specific_file): def main(): parser = argparse.ArgumentParser(description='Run nft tests', version='1.0') - parser.add_argument('filename', nargs='?', metavar='path/to/file.t', - help='Run only this test') + parser.add_argument('filenames', nargs='*', metavar='path/to/file.t', + help='Run only these tests') parser.add_argument('-d', '--debug', action='store_true', dest='debug', help='enable debugging mode') @@ -1129,9 +1129,10 @@ def main(): return file_list = [] - if args.filename: - file_list = [args.filename] - specific_file = True + if args.filenames: + file_list = args.filenames + if len(args.filenames) == 1: + specific_file = True else: for directory in TESTS_DIRECTORY: path = os.path.join(TESTS_PATH, directory) -- 2.16.1 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html