From: Gabe Black Date: Tue, 28 Aug 2018 03:39:01 +0000 (-0700) Subject: systemc: Abort verify.py if no tests were selected. X-Git-Tag: v19.0.0.0~1718 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d78c8b20ed0809f557dc542dcad4a91642e956f1;p=gem5.git systemc: Abort verify.py if no tests were selected. 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 Maintainer: Gabe Black --- diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py index f56c50a79..c2605a2cd 100755 --- a/src/systemc/tests/verify.py +++ b/src/systemc/tests/verify.py @@ -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))