summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xllvm/utils/update_analyze_test_checks.py8
-rwxr-xr-xllvm/utils/update_llc_test_checks.py4
-rwxr-xr-xllvm/utils/update_mir_test_checks.py4
-rwxr-xr-xllvm/utils/update_test_checks.py4
4 files changed, 12 insertions, 8 deletions
diff --git a/llvm/utils/update_analyze_test_checks.py b/llvm/utils/update_analyze_test_checks.py
index 4d1d912aba8..df09108937c 100755
--- a/llvm/utils/update_analyze_test_checks.py
+++ b/llvm/utils/update_analyze_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
@@ -48,10 +49,6 @@ ADVERT = '; NOTE: Assertions have been autogenerated by '
IR_FUNCTION_RE = re.compile('^\s*define\s+(?:internal\s+)?[^@]*@([\w-]+)\s*\(')
-
-
-
-
def main():
from argparse import RawTextHelpFormatter
parser = argparse.ArgumentParser(description=__doc__, formatter_class=RawTextHelpFormatter)
@@ -71,7 +68,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:
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py
index 5d2aac2509e..9dd25d386b1 100755
--- a/llvm/utils/update_llc_test_checks.py
+++ b/llvm/utils/update_llc_test_checks.py
@@ -10,6 +10,7 @@ a single test function.
from __future__ import print_function
import argparse
+import glob
import os # Used to advertise this file's name ("autogenerated_note").
import string
import subprocess
@@ -42,7 +43,8 @@ def main():
autogenerated_note = (ADVERT + 'utils/' + os.path.basename(__file__))
- 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:
diff --git a/llvm/utils/update_mir_test_checks.py b/llvm/utils/update_mir_test_checks.py
index cf7528f5760..b42a38bd55a 100755
--- a/llvm/utils/update_mir_test_checks.py
+++ b/llvm/utils/update_mir_test_checks.py
@@ -21,6 +21,7 @@ from __future__ import print_function
import argparse
import collections
+import glob
import os
import re
import subprocess
@@ -426,7 +427,8 @@ def main():
parser.add_argument('tests', nargs='+')
args = parser.parse_args()
- for test in args.tests:
+ test_paths = [test for pattern in args.tests for test in glob.glob(pattern)]
+ for test in test_paths:
try:
update_test_file(args.llc, test, args.remove_common_prefixes,
verbose=args.verbose)
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:
OpenPOWER on IntegriCloud