Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py

Issue 326483002: Make update-flaky-tests work for debug builders as well. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add tests Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Tools/Scripts/webkitpy/tool/commands/flakytests.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 from webkitpy.tool.commands.commandtest import CommandsTest 5 from webkitpy.tool.commands.commandtest import CommandsTest
6 from webkitpy.tool.mocktool import MockTool, MockOptions 6 from webkitpy.tool.mocktool import MockTool, MockOptions
7 7
8 import flakytests 8 import flakytests
9 9
10 10
11 class FakeBotTestExpectations(object): 11 class FakeBotTestExpectations(object):
12 def expectation_lines(self, only_ignore_very_flaky=False): 12 def expectation_lines(self, only_ignore_very_flaky=False):
13 return [] 13 return []
14 14
15 15
16 class FakeBotTestExpectationsFactory(object): 16 class FakeBotTestExpectationsFactory(object):
17 def expectations_for_port(self, port_name): 17 def expectations_for_builder(self, builder):
18 return FakeBotTestExpectations() 18 return FakeBotTestExpectations()
19 19
20 20
21 class FlakyTestsTest(CommandsTest): 21 class FlakyTestsTest(CommandsTest):
22 def test_simple(self): 22 def test_simple(self):
23 command = flakytests.FlakyTests() 23 command = flakytests.FlakyTests()
24 factory = FakeBotTestExpectationsFactory() 24 factory = FakeBotTestExpectationsFactory()
25 lines = command._collect_expectation_lines(['foo'], factory) 25 lines = command._collect_expectation_lines(['foo'], factory)
26 self.assertEqual(lines, []) 26 self.assertEqual(lines, [])
27 27
28 def test_integration(self): 28 def test_integration(self):
29 command = flakytests.FlakyTests() 29 command = flakytests.FlakyTests()
30 command.expectations_factory = FakeBotTestExpectationsFactory 30 command.expectations_factory = FakeBotTestExpectationsFactory
31 options = MockOptions(upload=True) 31 options = MockOptions(upload=True)
32 expected_stdout = """Updated /mock-checkout/third_party/WebKit/LayoutTes ts/FlakyTests 32 expected_stdout = """Updated /mock-checkout/third_party/WebKit/LayoutTes ts/FlakyTests
33 LayoutTests/FlakyTests is not changed, not uploading. 33 LayoutTests/FlakyTests is not changed, not uploading.
34 """ 34 """
35 self.assert_execute_outputs(command, options=options, expected_stdout=ex pected_stdout) 35 self.assert_execute_outputs(command, options=options, expected_stdout=ex pected_stdout)
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/tool/commands/flakytests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698