Commit 19d777d5 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Update traffic annotation tests on Windows FYI bot.

When network traffic annotation tests are run on Windows without
filtering for relevant files (to test heuristics), there might be
compile errors that can be ignored.

Bug: 844014
Change-Id: Ib1e843971ea8892430142ccb6a5f7ac71714e0ff
TBR: georgesak@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/1125069Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572491}
parent ea0521dd
...@@ -91,10 +91,13 @@ class TrafficAnnotationTestsChecker(): ...@@ -91,10 +91,13 @@ class TrafficAnnotationTestsChecker():
_, stderr_text, return_code = self.tools.RunAuditor( _, stderr_text, return_code = self.tools.RunAuditor(
args + ["--annotations-file=%s" % temp_filename]) args + ["--annotations-file=%s" % temp_filename])
# TODO(https://crbug.com/844014): Remove after debugging.
print("Return Code: %i" % return_code)
print("File Exists: %i" % os.path.exists(temp_filename))
if os.path.exists(temp_filename): if os.path.exists(temp_filename):
# When tests are run on all files (without filtering), there might be some
# compile errors in irrelevant files on Windows that can be ignored.
if (return_code and "--no-filtering" in args and
sys.platform.startswith(('win', 'cygwin'))):
print("Ignoring return code: %i" % return_code)
return_code = 0
annotations = None if return_code else open(temp_filename).read() annotations = None if return_code else open(temp_filename).read()
os.remove(temp_filename) os.remove(temp_filename)
else: else:
......
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