diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-03-05 10:44:37 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-03-05 10:44:37 +0000 |
commit | f509fe4655a0c53a7db25d792d22f34daa5bec36 (patch) | |
tree | 870c7e384d30e41e6d2b4f3d4e4d8557c3620ca0 /llvm/utils/update_test_checks.py | |
parent | 4a9086b537371627252832eb4ce56065c220a787 (diff) | |
download | bcm5719-llvm-f509fe4655a0c53a7db25d792d22f34daa5bec36.tar.gz bcm5719-llvm-f509fe4655a0c53a7db25d792d22f34daa5bec36.zip |
Add wildcard support to all update_*_test_checks.py scripts (PR37500)
We can already update multiple files in each update call, this extends it to work with wildcards as well in the same way as update_mca_test_checks.py (to support shells that won't do this for us - windows command prompt etc.)
Differential Revision: https://reviews.llvm.org/D58817
llvm-svn: 355386
Diffstat (limited to 'llvm/utils/update_test_checks.py')
-rwxr-xr-x | llvm/utils/update_test_checks.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/update_test_checks.py b/llvm/utils/update_test_checks.py index b63a9174208..f108e8c74b1 100755 --- a/llvm/utils/update_test_checks.py +++ b/llvm/utils/update_test_checks.py @@ -32,6 +32,7 @@ designed to be authoratitive about what constitutes a good test! from __future__ import print_function import argparse +import glob import itertools import os # Used to advertise this file's name ("autogenerated_note"). import string @@ -71,7 +72,8 @@ def main(): print('ERROR: Unexpected opt name: ' + opt_basename, file=sys.stderr) sys.exit(1) - for test in args.tests: + test_paths = [test for pattern in args.tests for test in glob.glob(pattern)] + for test in test_paths: if args.verbose: print('Scanning for RUN lines in test file: %s' % (test,), file=sys.stderr) with open(test) as f: |