From: Fangrui Song Date: Sun, 12 May 2019 04:55:09 +0000 (+0000) Subject: [utils] update_test_checks.py: allow opt-8, opt-9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93f4a114e41a52fec668648acc29dd071fcdc825;p=llvm [utils] update_test_checks.py: allow opt-8, opt-9 Allow using Debian's opt-8, opt-9 with update_test_checks.py Patch by Shawn Landden! Differential Revision: https://reviews.llvm.org/D61148 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360536 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/update_test_checks.py b/utils/update_test_checks.py index f108e8c74b1..de2900a4ab6 100755 --- a/utils/update_test_checks.py +++ b/utils/update_test_checks.py @@ -68,9 +68,10 @@ def main(): autogenerated_note = (ADVERT + 'utils/' + os.path.basename(__file__)) opt_basename = os.path.basename(args.opt_binary) - if (opt_basename != "opt"): + if not re.match(r'^opt(-\d+)?$', opt_basename): print('ERROR: Unexpected opt name: ' + opt_basename, file=sys.stderr) sys.exit(1) + opt_basename = 'opt' test_paths = [test for pattern in args.tests for test in glob.glob(pattern)] for test in test_paths: