Commit 921ec8c5 authored by Nicolas Ouellet-payeur's avatar Nicolas Ouellet-payeur Committed by Commit Bot

[Traffic Annotations] Improve logging on linux-annotator-rel

The network annotation auditor is failing on waterfall with an unknown reason on
linux-annotator-rel, when using the python script [1]. This CL adds logging to
help troubleshoot the issue.

[1] https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8904561230202338112/+/steps/test_traffic_annotation_auditor/0/stdout

Change-Id: I50ba290eae8c9ad50320c85e3e4c591636b8ff9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761359
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Auto-Submit: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689487}
parent 8c5caaf4
...@@ -411,6 +411,10 @@ int main(int argc, char* argv[]) { ...@@ -411,6 +411,10 @@ int main(int argc, char* argv[]) {
} }
} }
// TODO(nicolaso): Remove this once it's no longer needed for debugging.
LOG(INFO) << "Extractor raw output: ";
LOG(INFO) << auditor.extractor_raw_output();
// Process extractor output. // Process extractor output.
if (!auditor.ParseClangToolRawOutput()) if (!auditor.ParseClangToolRawOutput())
return error_value; return error_value;
......
...@@ -75,4 +75,4 @@ The following two lines will be updated by the above script, and the modified ...@@ -75,4 +75,4 @@ The following two lines will be updated by the above script, and the modified
README should be committed along with the updated .sha1 checksums. README should be committed along with the updated .sha1 checksums.
CLANG_REVISION = 'f7e52fbdb5a7af8ea0808e98458b497125a5eca1' CLANG_REVISION = 'f7e52fbdb5a7af8ea0808e98458b497125a5eca1'
LASTCHANGE=4009498b8ae0bf5ec38da3e7a067c7867a133d36-refs/heads/master@{#689353} LASTCHANGE=04a5a08bfbb3f9bd00861fe895279241ab36afc3-refs/heads/master@{#688993}
801fcc22d673090767b4b41ca5d0820e31d85dcd e45bc93e4e7f4e853a557ce9a074e72b490f3f23
\ No newline at end of file \ No newline at end of file
...@@ -140,9 +140,12 @@ class NetworkTrafficAnnotationTools(): ...@@ -140,9 +140,12 @@ class NetworkTrafficAnnotationTools():
return_code: int Auditor's exit code. return_code: int Auditor's exit code.
""" """
command_line = [self.auditor_path, "--build-path=" + self.build_path] + args
# TODO(nicolaso): Remove once it's no longer needed for debugging.
print("Running %s" % command_line)
command = subprocess.Popen( command = subprocess.Popen(
[self.auditor_path, "--build-path=" + self.build_path] + args, command_line, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout_text, stderr_text = command.communicate() stdout_text, stderr_text = command.communicate()
return_code = command.returncode return_code = command.returncode
......
...@@ -117,7 +117,7 @@ class TrafficAnnotationTestsChecker(): ...@@ -117,7 +117,7 @@ class TrafficAnnotationTestsChecker():
except OSError: except OSError:
pass pass
_, stderr_text, return_code = self.tools.RunAuditor( stdout_text, stderr_text, return_code = self.tools.RunAuditor(
args + ["--annotations-file=%s" % self.annotations_filename]) args + ["--annotations-file=%s" % self.annotations_filename])
annotations = None annotations = None
...@@ -136,7 +136,12 @@ class TrafficAnnotationTestsChecker(): ...@@ -136,7 +136,12 @@ class TrafficAnnotationTestsChecker():
if annotations: if annotations:
print("Test PASSED.") print("Test PASSED.")
else: else:
print("Test FAILED.\n%s" % stderr_text) print("Test FAILED.")
if stdout_text:
print(stdout_text)
if stderr_text:
print(stderr_text)
return annotations return annotations
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment