[PATCH] D64572: [UpdateTestChecks] Emit error when invalid test paths

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 09:43:17 PDT 2019


xbolva00 updated this revision to Diff 209250.
xbolva00 added a comment.

Improve code, emit warning instead of error.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64572/new/

https://reviews.llvm.org/D64572

Files:
  utils/update_test_checks.py


Index: utils/update_test_checks.py
===================================================================
--- utils/update_test_checks.py
+++ utils/update_test_checks.py
@@ -73,7 +73,13 @@
     sys.exit(1)
   opt_basename = 'opt'
 
-  test_paths = [test for pattern in args.tests for test in glob.glob(pattern)]
+  test_paths = []
+  for test in args.tests:
+    if not glob.glob(test):
+      print('WARNING: Test file \'%s\' was not found. Ignoring it.' % (test,), file=sys.stderr)
+      continue
+    test_paths.append(test)
+
   for test in test_paths:
     if args.verbose:
       print('Scanning for RUN lines in test file: %s' % (test,), file=sys.stderr)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64572.209250.patch
Type: text/x-patch
Size: 660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/8977c162/attachment.bin>


More information about the llvm-commits mailing list