From d78c8b20ed0809f557dc542dcad4a91642e956f1 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 27 Aug 2018 20:39:01 -0700 Subject: [PATCH] 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 --- src/systemc/tests/verify.py | 4 ++++ 1 file changed, 4 insertions(+) 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)) -- 2.30.2