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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

Issue 2859703002: webkitpy: Override TEMPDIR for Xvfb. (Closed)
Patch Set: todo comment Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline_unittest.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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 json 5 import json
6 import optparse 6 import optparse
7 import unittest 7 import unittest
8 8
9 from webkitpy.common.net.buildbot import Build 9 from webkitpy.common.net.buildbot import Build
10 from webkitpy.common.net.layout_test_results import LayoutTestResults 10 from webkitpy.common.net.layout_test_results import LayoutTestResults
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 num_previous_calls = len(self.calls) 1131 num_previous_calls = len(self.calls)
1132 command_outputs = [] 1132 command_outputs = []
1133 for cmd_line, cwd in commands: 1133 for cmd_line, cwd in commands:
1134 out = self.run_command(cmd_line, cwd=cwd) 1134 out = self.run_command(cmd_line, cwd=cwd)
1135 if 'rebaseline-test-internal' in cmd_line: 1135 if 'rebaseline-test-internal' in cmd_line:
1136 test = cmd_line[cmd_line.index('--test') + 1] 1136 test = cmd_line[cmd_line.index('--test') + 1]
1137 port_name = cmd_line[cmd_line.index('--port-name') + 1] 1137 port_name = cmd_line[cmd_line.index('--port-name') + 1]
1138 out = json.dumps({'remove-lines': [{'test': test, 'port_name': p ort_name}]}) 1138 out = json.dumps({'remove-lines': [{'test': test, 'port_name': p ort_name}]})
1139 command_outputs.append([0, out, '']) 1139 command_outputs.append([0, out, ''])
1140 1140
1141 new_calls = self.calls[num_previous_calls:] 1141 new_calls = self.full_calls[num_previous_calls:]
1142 self.calls = self.calls[:num_previous_calls] 1142 self.full_calls = self.full_calls[:num_previous_calls]
1143 self.calls.append(new_calls) 1143 self.full_calls.append(new_calls)
1144 return command_outputs 1144 return command_outputs
1145 1145
1146 1146
1147 class TestBaselineSetTest(unittest.TestCase): 1147 class TestBaselineSetTest(unittest.TestCase):
1148 1148
1149 def setUp(self): 1149 def setUp(self):
1150 host = MockWebKitPatch() 1150 host = MockWebKitPatch()
1151 host.port_factory = MockPortFactory(host) 1151 host.port_factory = MockPortFactory(host)
1152 port = host.port_factory.get() 1152 port = host.port_factory.get()
1153 base_dir = port.layout_tests_dir() 1153 base_dir = port.layout_tests_dir()
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 test_baseline_set = TestBaselineSet(host=self.host) 1192 test_baseline_set = TestBaselineSet(host=self.host)
1193 test_baseline_set.add('a/x.html', Build('MOCK Mac10.12')) 1193 test_baseline_set.add('a/x.html', Build('MOCK Mac10.12'))
1194 test_baseline_set.add('a/x.html', Build('MOCK Win10')) 1194 test_baseline_set.add('a/x.html', Build('MOCK Win10'))
1195 self.assertEqual(test_baseline_set.test_prefixes(), ['a/x.html']) 1195 self.assertEqual(test_baseline_set.test_prefixes(), ['a/x.html'])
1196 self.assertEqual( 1196 self.assertEqual(
1197 test_baseline_set.build_port_pairs('a/x.html'), 1197 test_baseline_set.build_port_pairs('a/x.html'),
1198 [ 1198 [
1199 (Build(builder_name='MOCK Mac10.12'), 'test-mac-mac10.12'), 1199 (Build(builder_name='MOCK Mac10.12'), 'test-mac-mac10.12'),
1200 (Build(builder_name='MOCK Win10'), 'test-win-win10') 1200 (Build(builder_name='MOCK Win10'), 'test-win-win10')
1201 ]) 1201 ])
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698