diff options
author | George Burgess IV <gbiv@google.com> | 2019-05-08 12:48:50 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-11 14:18:19 -0700 |
commit | f7e10ed99a41c8cded9cf1ce01aef2c7116318c4 (patch) | |
tree | 52800b3ad131510143de34e172494445a9776948 /clang_tidy | |
parent | 8ce23dffa124fee06b90af75b4c846e7606f104e (diff) | |
download | toolchain-utils-f7e10ed99a41c8cded9cf1ce01aef2c7116318c4.tar.gz |
clang_tidy: exit with an error code if clang-tidy fails
This also makes us print error output to stderr.
No functional change is intended.
BUG=chromium:960495
TEST=tryjob
Change-Id: Ib9f0a3cf2bc1fe67066c93ea128db27aec98935b
Reviewed-on: https://chromium-review.googlesource.com/1601197
Commit-Ready: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>
Diffstat (limited to 'clang_tidy')
-rwxr-xr-x | clang_tidy/clang-tidy-parse-build-log.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang_tidy/clang-tidy-parse-build-log.py b/clang_tidy/clang-tidy-parse-build-log.py index 99234c4c..e65fcc94 100755 --- a/clang_tidy/clang-tidy-parse-build-log.py +++ b/clang_tidy/clang-tidy-parse-build-log.py @@ -103,7 +103,7 @@ def Main(argv): '--url http://cs/android --separator "?l=" > %s' % warnfile) if result.returncode != 0: - print("Couldn't generate warnings.html") + print("Couldn't generate warnings.html", file=sys.stderr) try: os.remove(warnfile) except EnvironmentError: @@ -112,6 +112,7 @@ def Main(argv): os.remove(warnfile_csv) except EnvironmentError: pass + return 1 return 0 |