]> granicus.if.org Git - llvm/commitdiff
[utils] update_test_checks.py: allow opt-8, opt-9
authorFangrui Song <maskray@google.com>
Sun, 12 May 2019 04:55:09 +0000 (04:55 +0000)
committerFangrui Song <maskray@google.com>
Sun, 12 May 2019 04:55:09 +0000 (04:55 +0000)
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

utils/update_test_checks.py

index f108e8c74b1769a56105070a7fe933a01d4a8508..de2900a4ab6e70b5e831452632732c4ee4fb3011 100755 (executable)
@@ -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: