tests/run-tests: Fix handling of --list-tests wrt skipped tests.

"skip <test>" message could leak before.
This commit is contained in:
Paul Sokolovsky 2017-12-14 12:11:17 +02:00
parent 8d11fc0bc4
commit aaeb70b7b7
1 changed files with 5 additions and 4 deletions

View File

@ -376,15 +376,16 @@ def run_tests(pyb, tests, args, base_path="."):
skip_it |= skip_const and is_const skip_it |= skip_const and is_const
skip_it |= skip_revops and test_name.startswith("class_reverse_op") skip_it |= skip_revops and test_name.startswith("class_reverse_op")
if args.list_tests:
if not skip_it:
print(test_file)
continue
if skip_it: if skip_it:
print("skip ", test_file) print("skip ", test_file)
skipped_tests.append(test_name) skipped_tests.append(test_name)
continue continue
if args.list_tests:
print(test_file)
continue
# get expected output # get expected output
test_file_expected = test_file + '.exp' test_file_expected = test_file + '.exp'
if os.path.isfile(test_file_expected): if os.path.isfile(test_file_expected):