[Traffic Annotation] Fail on CQ on C++ parsing error
Previously, CQ would pass if extractor.py failed at parsing the C++ declaration. With this CL, parsing errors make CQ turn red (to avoid committing code that will make linux-annotator-rel fail). Also, always rerun extractor.py when there's an error to get stderr contents. Previously, when running with --error-resilient, it wouldn't re-run the Clang tool. This saved several minutes on CQ, but didn't report a useful error message. Since extractor.py is _much_ faster, the tradeoff is different: the error message is more important than the couple of seconds saved. Finally: slightly improve extractor.py's error reporting when it fails to parse the annotation declaration. This makes it more actionable and gives better context to the CL author. TESTED=traffic_annotation_auditor_unittests, extractor_test.py, annotation_tokenizer_test.py Bug: 1046794 Change-Id: Id397dcfcced39fbebf72ffcdc6d6549c66c2910f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028707 Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Reviewed-by:Ramin Halavati <rhalavati@chromium.org> Cr-Commit-Position: refs/heads/master@{#737039}
Showing
Please register or sign in to comment