def setUp(self): BaseTestCase.setUp(self) LoggingTestCase.setUp(self) web = MockWeb(urls={ 'https://codereview.chromium.org/api/11112222': json.dumps({ 'patchsets': [1, 2], }), 'https://codereview.chromium.org/api/11112222/2': json.dumps({ 'try_job_results': [ { 'builder': 'MOCK Try Win', 'buildnumber': 5000, 'result': 0, }, { 'builder': 'MOCK Try Mac', 'buildnumber': 4000, 'result': 0, }, ], 'files': { 'third_party/WebKit/LayoutTests/fast/dom/prototype-inheritance.html': {'status': 'M'}, 'third_party/WebKit/LayoutTests/fast/dom/prototype-taco.html': {'status': 'M'}, }, }), }) self.tool.builders = BuilderList({ "MOCK Try Win": { "port_name": "test-win-win7", "specifiers": ["Win7", "Release"], "is_try_builder": True, }, "MOCK Try Linux": { "port_name": "test-mac-mac10.10", "specifiers": ["Mac10.10", "Release"], "is_try_builder": True, }, }) self.command.rietveld = Rietveld(web) self.tool.buildbot.set_retry_sumary_json(Build('MOCK Try Win', 5000), json.dumps({ 'failures': [ 'fast/dom/prototype-newtest.html', 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ], 'ignored': [], })) # Write to the mock filesystem so that these tests are considered to exist. port = self.mac_port tests = [ 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'fast/dom/prototype-newtest.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ] for test in tests: self._write(port.host.filesystem.join(port.layout_tests_dir(), test), 'contents')
def setUp(self): BaseTestCase.setUp(self) LoggingTestCase.setUp(self) web = MockWeb(urls={ 'https://codereview.chromium.org/api/11112222': json.dumps({ 'patchsets': [1, 2], }), 'https://codereview.chromium.org/api/11112222/2': json.dumps({ 'try_job_results': [ { 'builder': 'MOCK Try Win', 'buildnumber': 5000, 'result': 0, }, { 'builder': 'MOCK Try Mac', 'buildnumber': 4000, 'result': 0, }, ], 'files': { 'third_party/WebKit/LayoutTests/fast/dom/prototype-inheritance.html': {'status': 'M'}, 'third_party/WebKit/LayoutTests/fast/dom/prototype-taco.html': {'status': 'M'}, }, }), }) self.tool.builders = BuilderList({ "MOCK Try Win": { "port_name": "test-win-win7", "specifiers": ["Win7", "Release"], "is_try_builder": True, }, "MOCK Try Linux": { "port_name": "test-mac-mac10.10", "specifiers": ["Mac10.10", "Release"], "is_try_builder": True, }, }) self.command.rietveld = Rietveld(web) self.tool.buildbot.set_retry_sumary_json(Build('MOCK Try Win', 5000), json.dumps({ 'failures': [ 'fast/dom/prototype-newtest.html', 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ], 'ignored': [], })) # Write to the mock filesystem so that these tests are considered to exist. port = self.mac_port tests = [ 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'fast/dom/prototype-newtest.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ] for test in tests: self._write(port.host.filesystem.join(port.layout_tests_dir(), test), 'contents')
def setUp(self): BaseTestCase.setUp(self) LoggingTestCase.setUp(self) builds = [ Build('MOCK Try Win', 5000), Build('MOCK Try Mac', 4000), Build('MOCK Try Linux', 6000), ] git_cl = GitCL(self.tool) git_cl.get_issue_number = lambda: '11112222' git_cl.latest_try_jobs = lambda _: builds self.command.git_cl = lambda: git_cl git = MockGit(filesystem=self.tool.filesystem, executive=self.tool.executive) git.changed_files = lambda **_: [ 'third_party/WebKit/LayoutTests/fast/dom/prototype-inheritance.html', 'third_party/WebKit/LayoutTests/fast/dom/prototype-taco.html', ] self.tool.git = lambda: git self.tool.builders = BuilderList({ 'MOCK Try Win': { 'port_name': 'test-win-win7', 'specifiers': ['Win7', 'Release'], 'is_try_builder': True, }, 'MOCK Try Linux': { 'port_name': 'test-linux-trusty', 'specifiers': ['Trusty', 'Release'], 'is_try_builder': True, }, 'MOCK Try Mac': { 'port_name': 'test-mac-mac10.11', 'specifiers': ['Mac10.11', 'Release'], 'is_try_builder': True, }, }) layout_test_results = LayoutTestResults({ 'tests': { 'fast': { 'dom': { 'prototype-inheritance.html': { 'expected': 'PASS', 'actual': 'TEXT', 'is_unexpected': True, }, 'prototype-banana.html': { 'expected': 'FAIL', 'actual': 'PASS', 'is_unexpected': True, }, 'prototype-taco.html': { 'expected': 'PASS', 'actual': 'PASS TEXT', 'is_unexpected': True, }, 'prototype-chocolate.html': { 'expected': 'FAIL', 'actual': 'IMAGE+TEXT' }, 'prototype-crashy.html': { 'expected': 'PASS', 'actual': 'CRASH', 'is_unexpected': True, }, 'prototype-newtest.html': { 'expected': 'PASS', 'actual': 'MISSING', 'is_unexpected': True, 'is_missing_text': True, }, 'prototype-slowtest.html': { 'expected': 'SLOW', 'actual': 'TEXT', 'is_unexpected': True, }, } }, 'svg': { 'dynamic-updates': { 'SVGFEDropShadowElement-dom-stdDeviation-attr.html': { 'expected': 'PASS', 'actual': 'IMAGE', 'has_stderr': True, 'is_unexpected': True, } } } } }) for build in builds: self.tool.buildbot.set_results(build, layout_test_results) self.tool.buildbot.set_retry_sumary_json( build, json.dumps({ 'failures': [ 'fast/dom/prototype-inheritance.html', 'fast/dom/prototype-newtest.html', 'fast/dom/prototype-slowtest.html', 'fast/dom/prototype-taco.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ], 'ignored': [], })) # Write to the mock filesystem so that these tests are considered to exist. tests = [ 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'fast/dom/prototype-newtest.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ] for test in tests: self._write( self.mac_port.host.filesystem.join( self.mac_port.layout_tests_dir(), test), 'contents')
def tearDown(self): BaseTestCase.tearDown(self) LoggingTestCase.tearDown(self)
def setUp(self): BaseTestCase.setUp(self) LoggingTestCase.setUp(self) web = MockWeb(urls={ 'https://codereview.chromium.org/api/11112222': json.dumps({ 'patchsets': [1, 2], }), 'https://codereview.chromium.org/api/11112222/2': json.dumps({ 'try_job_results': [ { 'builder': 'MOCK Try Win', 'buildnumber': 5000, 'result': 0, }, { 'builder': 'MOCK Try Mac', 'buildnumber': 4000, 'result': 0, }, ], 'files': { 'third_party/WebKit/LayoutTests/fast/dom/prototype-inheritance.html': {'status': 'M'}, 'third_party/WebKit/LayoutTests/fast/dom/prototype-taco.html': {'status': 'M'}, }, }), }) self.tool.builders = BuilderList({ "MOCK Try Win": { "port_name": "test-win-win7", "specifiers": ["Win7", "Release"], "is_try_builder": True, }, "MOCK Try Linux": { "port_name": "test-linux-trusty", "specifiers": ["Trusty", "Release"], "is_try_builder": True, }, }) self.command.rietveld = Rietveld(web) layout_test_results = LayoutTestResults({ 'tests': { 'fast': { 'dom': { 'prototype-inheritance.html': { 'expected': 'PASS', 'actual': 'TEXT', 'is_unexpected': True, }, 'prototype-banana.html': { 'expected': 'FAIL', 'actual': 'PASS', 'is_unexpected': True, }, 'prototype-taco.html': { 'expected': 'PASS', 'actual': 'PASS TEXT', 'is_unexpected': True, }, 'prototype-chocolate.html': { 'expected': 'FAIL', 'actual': 'IMAGE+TEXT' }, 'prototype-crashy.html': { 'expected': 'PASS', 'actual': 'CRASH', 'is_unexpected': True, }, 'prototype-newtest.html': { 'expected': 'PASS', 'actual': 'MISSING', 'is_unexpected': True, 'is_missing_text': True, }, 'prototype-slowtest.html': { 'expected': 'SLOW', 'actual': 'TEXT', 'is_unexpected': True, }, } }, 'svg': { 'dynamic-updates': { 'SVGFEDropShadowElement-dom-stdDeviation-attr.html': { 'expected': 'PASS', 'actual': 'IMAGE', 'has_stderr': True, 'is_unexpected': True, } } } } }) for build in [Build('MOCK Try Win', 5000), Build('MOCK Try Mac', 4000)]: self.tool.buildbot.set_results(build, layout_test_results) self.tool.buildbot.set_retry_sumary_json(Build('MOCK Try Win', 5000), json.dumps({ 'failures': [ 'fast/dom/prototype-inheritance.html', 'fast/dom/prototype-newtest.html', 'fast/dom/prototype-slowtest.html', 'fast/dom/prototype-taco.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ], 'ignored': [], })) # Write to the mock filesystem so that these tests are considered to exist. port = self.mac_port tests = [ 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'fast/dom/prototype-newtest.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ] for test in tests: self._write(port.host.filesystem.join(port.layout_tests_dir(), test), 'contents')
def setUp(self): BaseTestCase.setUp(self) LoggingTestCase.setUp(self) builds = { Build('MOCK Try Win', 5000): TryJobStatus('COMPLETED', 'FAILURE'), Build('MOCK Try Mac', 4000): TryJobStatus('COMPLETED', 'FAILURE'), Build('MOCK Try Linux', 6000): TryJobStatus('COMPLETED', 'FAILURE'), } self.command.git_cl = MockGitCL(self.tool, builds) git = MockGit(filesystem=self.tool.filesystem, executive=self.tool.executive) git.changed_files = lambda **_: [ 'third_party/WebKit/LayoutTests/one/text-fail.html', 'third_party/WebKit/LayoutTests/one/flaky-fail.html', ] self.tool.git = lambda: git self.tool.builders = BuilderList({ 'MOCK Try Win': { 'port_name': 'test-win-win7', 'specifiers': ['Win7', 'Release'], 'is_try_builder': True, }, 'MOCK Try Linux': { 'port_name': 'test-linux-trusty', 'specifiers': ['Trusty', 'Release'], 'is_try_builder': True, }, 'MOCK Try Mac': { 'port_name': 'test-mac-mac10.11', 'specifiers': ['Mac10.11', 'Release'], 'is_try_builder': True, }, }) layout_test_results = LayoutTestResults({ 'tests': { 'one': { 'crash.html': { 'expected': 'PASS', 'actual': 'CRASH', 'is_unexpected': True }, 'expected-fail.html': { 'expected': 'FAIL', 'actual': 'IMAGE+TEXT' }, 'flaky-fail.html': { 'expected': 'PASS', 'actual': 'PASS TEXT', 'is_unexpected': True }, 'missing.html': { 'expected': 'PASS', 'actual': 'MISSING', 'is_unexpected': True }, 'slow-fail.html': { 'expected': 'SLOW', 'actual': 'TEXT', 'is_unexpected': True }, 'text-fail.html': { 'expected': 'PASS', 'actual': 'TEXT', 'is_unexpected': True }, 'unexpected-pass.html': { 'expected': 'FAIL', 'actual': 'PASS', 'is_unexpected': True }, }, 'two': { 'image-fail.html': { 'expected': 'PASS', 'actual': 'IMAGE', 'is_unexpected': True } }, }, }) for build in builds: self.tool.buildbot.set_results(build, layout_test_results) self.tool.buildbot.set_retry_sumary_json( build, json.dumps({ 'failures': [ 'one/flaky-fail.html', 'one/missing.html', 'one/slow-fail.html', 'one/text-fail.html', 'two/image-fail.html', ], 'ignored': [], })) # Write to the mock filesystem so that these tests are considered to exist. tests = [ 'one/flaky-fail.html', 'one/missing.html', 'one/slow-fail.html', 'one/text-fail.html', 'two/image-fail.html', ] for test in tests: path = self.mac_port.host.filesystem.join( self.mac_port.layout_tests_dir(), test) self._write(path, 'contents') self.mac_port.host.filesystem.write_text_file( '/test.checkout/LayoutTests/external/wpt/MANIFEST.json', '{}')
def setUp(self): BaseTestCase.setUp(self) LoggingTestCase.setUp(self) web = MockWeb(urls={ 'https://codereview.chromium.org/api/11112222': json.dumps({ 'patchsets': [1, 2], }), 'https://codereview.chromium.org/api/11112222/2': json.dumps({ 'try_job_results': [ { 'builder': 'MOCK Try Win', 'buildnumber': 5000, 'result': 0, }, { 'builder': 'MOCK Try Mac', 'buildnumber': 4000, 'result': 0, }, ], 'files': { 'third_party/WebKit/LayoutTests/fast/dom/prototype-inheritance.html': {'status': 'M'}, 'third_party/WebKit/LayoutTests/fast/dom/prototype-taco.html': {'status': 'M'}, }, }), }) self.tool.builders = BuilderList({ "MOCK Try Win": { "port_name": "test-win-win7", "specifiers": ["Win7", "Release"], "is_try_builder": True, }, "MOCK Try Linux": { "port_name": "test-linux-trusty", "specifiers": ["Trusty", "Release"], "is_try_builder": True, }, }) self.command.rietveld = Rietveld(web) layout_test_results = LayoutTestResults({ 'tests': { 'fast': { 'dom': { 'prototype-inheritance.html': { 'expected': 'PASS', 'actual': 'TEXT', 'is_unexpected': True, }, 'prototype-banana.html': { 'expected': 'FAIL', 'actual': 'PASS', 'is_unexpected': True, }, 'prototype-taco.html': { 'expected': 'PASS', 'actual': 'PASS TEXT', 'is_unexpected': True, }, 'prototype-chocolate.html': { 'expected': 'FAIL', 'actual': 'IMAGE+TEXT' }, 'prototype-crashy.html': { 'expected': 'PASS', 'actual': 'CRASH', 'is_unexpected': True, }, 'prototype-newtest.html': { 'expected': 'PASS', 'actual': 'MISSING', 'is_unexpected': True, 'is_missing_text': True, } } }, 'svg': { 'dynamic-updates': { 'SVGFEDropShadowElement-dom-stdDeviation-attr.html': { 'expected': 'PASS', 'actual': 'IMAGE', 'has_stderr': True, 'is_unexpected': True, } } } } }) for build in [Build('MOCK Try Win', 5000), Build('MOCK Try Mac', 4000)]: self.tool.buildbot.set_results(build, layout_test_results) self.tool.buildbot.set_retry_sumary_json(Build('MOCK Try Win', 5000), json.dumps({ 'failures': [ 'fast/dom/prototype-newtest.html', 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ], 'ignored': [], })) # Write to the mock filesystem so that these tests are considered to exist. port = self.mac_port tests = [ 'fast/dom/prototype-taco.html', 'fast/dom/prototype-inheritance.html', 'fast/dom/prototype-newtest.html', 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html', ] for test in tests: self._write(port.host.filesystem.join(port.layout_tests_dir(), test), 'contents')
def tearDown(self): BaseTestCase.tearDown(self) LoggingTestCase.tearDown(self)