[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:29:07 PDT 2019
xbolva00 created this revision.
xbolva00 added reviewers: lebedev.ri, spatel.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Recently I ran into the following issue:
./update_test_checks.py /path/not-existing-file.ll
The script was silent and I was suprised why the real test file hadn't been updated.
Solution:
Emit error if we detect this problem.
./update_test_checks.py /path/to/not-existing-file.ll
ERROR: No valid test paths
Repository:
rL LLVM
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
@@ -74,6 +74,10 @@
opt_basename = 'opt'
test_paths = [test for pattern in args.tests for test in glob.glob(pattern)]
+ if not test_paths:
+ print('ERROR: No valid test paths', file=sys.stderr)
+ sys.exit(1)
+
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.209249.patch
Type: text/x-patch
Size: 523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/d2937562/attachment.bin>
More information about the llvm-commits
mailing list