Skip to content

Commit

Permalink
Windows, test wrapper: fix broken integration test
Browse files Browse the repository at this point in the history
Fixes #7632

Closes #7633.

PiperOrigin-RevId: 236865291
  • Loading branch information
laszlocsomor authored and katre committed Mar 8, 2019
1 parent 4e36a52 commit 81837b8
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/test/py/bazel/test_wrapper_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,21 @@ def _AssertUndeclaredOutputs(self, flag):
# machines run Windows Server 2016 core which recognizes fewer MIME types
# than desktop Windows versions, and one of the recognized types is ".ico"
# files.
self.assertListEqual(mf_content, [
'out1/data1.ico\t70\timage/x-icon',
'out2/data2.dat\t16\tapplication/octet-stream'
])
# Update(2019-03-05): apparently this MIME type is now recognized on CI as
# as "image/vnd.microsoft.icon". The standard MIME type is "image/x-icon",
# but Wikipedia lists a few alterantive ones, so the test will accept all of
# them.
if len(mf_content) != 2:
self._FailWithOutput(mf_content)
tokens = mf_content[0].split('\t')
if (len(tokens) != 3 or tokens[0] != 'out1/data1.ico' or
tokens[1] != '70' or tokens[2] not in [
'image/x-icon', 'image/vnd.microsoft.icon', 'image/ico',
'image/icon', 'text/ico', 'application/ico'
]):
self._FailWithOutput(mf_content)
if mf_content[1] != 'out2/data2.dat\t16\tapplication/octet-stream':
self._FailWithOutput(mf_content)

def _AssertUndeclaredOutputsAnnotations(self, flag):
exit_code, bazel_testlogs, stderr = self.RunBazel(
Expand Down

0 comments on commit 81837b8

Please sign in to comment.