]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Remove useless test list from run-tests.py help
authorJohannes Berg <johannes.berg@intel.com>
Sat, 2 Feb 2019 22:16:04 +0000 (23:16 +0100)
committerJouni Malinen <j@w1.fi>
Tue, 5 Feb 2019 21:51:36 +0000 (23:51 +0200)
There's no point in printing out a 3k+ long list, just remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/run-tests.py

index 49e42cd78b4d2db763002c78c6a7ae9fd27079cf..43c30efae98026dcdbb1039f1e8cf58119d3b776 100755 (executable)
@@ -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='<test>', 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")