[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

llvm-svn: 360536
This commit is contained in:
Fangrui Song 2019-05-12 04:55:09 +00:00
parent c9d82868e4
commit 60386c1c20

View File

@ -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: