| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import flakytests | 5 import flakytests |
| 6 | 6 |
| 7 from webkitpy.common.checkout.scm.scm_mock import MockSCM | 7 from webkitpy.layout_tests.builder_list import BuilderList |
| 8 from webkitpy.layout_tests.layout_package import bot_test_expectations | 8 from webkitpy.layout_tests.layout_package import bot_test_expectations |
| 9 from webkitpy.layout_tests.builder_list import BuilderList | |
| 10 from webkitpy.tool.commands.commandtest import CommandsTest | 9 from webkitpy.tool.commands.commandtest import CommandsTest |
| 11 from webkitpy.tool.mocktool import MockTool, MockOptions | 10 from webkitpy.tool.mocktool import MockTool, MockOptions |
| 12 | 11 |
| 13 | 12 |
| 14 class FakeBotTestExpectations(object): | 13 class FakeBotTestExpectations(object): |
| 15 | 14 |
| 16 def expectation_lines(self, only_ignore_very_flaky=False): | 15 def expectation_lines(self): |
| 17 return [] | 16 return [] |
| 18 | 17 |
| 19 | 18 |
| 20 class FakeBotTestExpectationsFactory(object): | 19 class FakeBotTestExpectationsFactory(object): |
| 21 FAILURE_MAP = {"A": "AUDIO", "C": "CRASH", "F": "TEXT", "I": "IMAGE", "O": "
MISSING", | 20 FAILURE_MAP = {"A": "AUDIO", "C": "CRASH", "F": "TEXT", "I": "IMAGE", "O": "
MISSING", |
| 22 "N": "NO DATA", "P": "PASS", "T": "TIMEOUT", "Y": "NOTRUN", "
X": "SKIP", | 21 "N": "NO DATA", "P": "PASS", "T": "TIMEOUT", "Y": "NOTRUN", "
X": "SKIP", |
| 23 "Z": "IMAGE+TEXT", "K": "LEAK"} | 22 "Z": "IMAGE+TEXT", "K": "LEAK"} |
| 24 | 23 |
| 25 def __init__(self, builders): | 24 def __init__(self, builders): |
| 26 self.builders = builders | 25 self.builders = builders |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 tool = MockTool() | 74 tool = MockTool() |
| 76 tool.builders = self.fake_builders_list() | 75 tool.builders = self.fake_builders_list() |
| 77 command.expectations_factory = FakeBotTestExpectationsFactory | 76 command.expectations_factory = FakeBotTestExpectationsFactory |
| 78 options = MockOptions(upload=True) | 77 options = MockOptions(upload=True) |
| 79 expected_stdout = flakytests.FlakyTests.OUTPUT % ( | 78 expected_stdout = flakytests.FlakyTests.OUTPUT % ( |
| 80 flakytests.FlakyTests.HEADER, | 79 flakytests.FlakyTests.HEADER, |
| 81 '', | 80 '', |
| 82 flakytests.FlakyTests.FLAKINESS_DASHBOARD_URL % '') + '\n' | 81 flakytests.FlakyTests.FLAKINESS_DASHBOARD_URL % '') + '\n' |
| 83 | 82 |
| 84 self.assert_execute_outputs(command, options=options, tool=tool, expecte
d_stdout=expected_stdout) | 83 self.assert_execute_outputs(command, options=options, tool=tool, expecte
d_stdout=expected_stdout) |
| OLD | NEW |