From b8b90135410e257f5f8a145e9bee9d28659894c5 Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Tue, 29 Mar 2022 14:50:34 -0700 Subject: [PATCH] [infra] Band-aid presubmit for new cpplint.py messages Bug: v8:12743 Change-Id: I4a36c0b794759d47eb9436714dfd2417fc45dcd2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3558327 Reviewed-by: Adam Klein Commit-Queue: Shu-yu Guo Cr-Commit-Position: refs/heads/main@{#79661} --- tools/v8_presubmit.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/v8_presubmit.py b/tools/v8_presubmit.py index a5b73a25a7..4c56af9d1e 100755 --- a/tools/v8_presubmit.py +++ b/tools/v8_presubmit.py @@ -73,7 +73,7 @@ LINT_RULES = """ -whitespace/comments """.split() -LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing') +LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]') FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n") ASSERT_OPTIMIZED_PATTERN = re.compile("assertOptimized") FLAGS_ENABLE_OPT = re.compile("//\s*Flags:.*--opt[^-].*\n") @@ -95,10 +95,14 @@ def CppLintWorker(command): print("Failed to process %s" % command.pop()) return 1 break - m = LINT_OUTPUT_PATTERN.match(out_line) - if m: - out_lines += out_line + if out_line.strip() == 'Total errors found: 0': + out_lines += "Done processing %s\n" % command.pop() error_count += 1 + else: + m = LINT_OUTPUT_PATTERN.match(out_line) + if m: + out_lines += out_line + error_count += 1 sys.stdout.write(out_lines) return error_count except KeyboardInterrupt: