From b513ed429d692fb2d305a0ab1a7ae881c1ce937d Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sat, 2 Feb 2019 23:16:04 +0100 Subject: [PATCH] tests: Remove useless test list from run-tests.py help There's no point in printing out a 3k+ long list, just remove it. Signed-off-by: Johannes Berg --- tests/hwsim/run-tests.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 49e42cd78..43c30efae 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -243,8 +243,7 @@ def main(): parser.add_argument('-i', action='store_true', dest='stdin_ctrl', help='stdin-controlled test case execution') parser.add_argument('tests', metavar='', nargs='*', type=str, - help='tests to run (only valid without -f)', - choices=[[]] + test_names) + help='tests to run (only valid without -f)') args = parser.parse_args() @@ -252,6 +251,15 @@ def main(): print('Invalid arguments - only one of (test, test modules, modules file) can be given.') sys.exit(2) + if args.tests: + fail = False + for t in args.tests: + if not t in test_names: + print('Invalid arguments - test "%s" not known' % t) + fail = True + if fail: + sys.exit(2) + if args.database: if not sqlite3_imported: print("No sqlite3 module found")