systemc: Abort verify.py if no tests were selected.
authorGabe Black <gabeblack@google.com>
Tue, 28 Aug 2018 03:39:01 +0000 (20:39 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 26 Sep 2018 00:04:21 +0000 (00:04 +0000)
The various phases assume there are at least some tests, and if there
are none they may try to run malformed commands.

Change-Id: I041d35c504da57b830c490651ab1b3c98e0288ca
Reviewed-on: https://gem5-review.googlesource.com/12273
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/tests/verify.py

index f56c50a79d1d4848f5c142148732b20c271c4d51..c2605a2cdabd856c37da4d5327d0ab75c66acb30 100755 (executable)
@@ -512,6 +512,10 @@ with open(json_path) as f:
                     test_data.iteritems() if eval(filt, dict(props))
     }
 
+    if len(filtered_tests) == 0:
+        print('All tests were filtered out.')
+        exit()
+
     if main_args.list:
         for target, props in sorted(filtered_tests.iteritems()):
             print('%s.%s' % (target, main_args.flavor))