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

Side by Side Diff: Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py

Issue 473473003: Remove virtual/softwarecompositing suite (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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
OLDNEW
1 # Copyright (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 else: 121 else:
122 self.assertEqual(fs.read_binary_file(path), contents) 122 self.assertEqual(fs.read_binary_file(path), contents)
123 123
124 # Check that the files that were in the original set have been deleted w here necessary. 124 # Check that the files that were in the original set have been deleted w here necessary.
125 for dirname in results_by_directory: 125 for dirname in results_by_directory:
126 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name) 126 path = fs.join(webkit_base, 'LayoutTests', dirname, baseline_name)
127 if not dirname in expected_new_results_by_directory: 127 if not dirname in expected_new_results_by_directory:
128 self.assertTrue(not fs.exists(path) or path in baseline_optimize r._files_to_delete) 128 self.assertTrue(not fs.exists(path) or path in baseline_optimize r._files_to_delete)
129 129
130 if expected_files_to_delete: 130 if expected_files_to_delete:
131 self.assertEqual(baseline_optimizer._files_to_delete, expected_files _to_delete) 131 self.assertEqual(sorted(baseline_optimizer._files_to_delete), sorted (expected_files_to_delete))
132 132
133 def test_linux_redundant_with_win(self): 133 def test_linux_redundant_with_win(self):
134 self._assertOptimization({ 134 self._assertOptimization({
135 'platform/win': '1', 135 'platform/win': '1',
136 'platform/linux': '1', 136 'platform/linux': '1',
137 }, { 137 }, {
138 'platform/win': '1', 138 'platform/win': '1',
139 }) 139 })
140 140
141 def test_covers_mac_win_linux(self): 141 def test_covers_mac_win_linux(self):
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 self._assertOptimization({ 214 self._assertOptimization({
215 'platform/mac': '1', 215 'platform/mac': '1',
216 'platform/win': '2', 216 'platform/win': '2',
217 }, { 217 }, {
218 'platform/mac': '1', 218 'platform/mac': '1',
219 'platform/win': '2', 219 'platform/win': '2',
220 }) 220 })
221 221
222 def test_virtual_root_redundant_with_actual_root(self): 222 def test_virtual_root_redundant_with_actual_root(self):
223 self._assertOptimization({ 223 self._assertOptimization({
224 'virtual/softwarecompositing': '2', 224 'virtual/gpu/fast/canvas': '2',
225 'compositing': '2', 225 'fast/canvas': '2',
226 }, { 226 }, {
227 'virtual/softwarecompositing': None, 227 'virtual/gpu/fast/canvas': None,
228 'compositing': '2', 228 'fast/canvas': '2',
229 }, baseline_dirname='virtual/softwarecompositing') 229 }, baseline_dirname='virtual/gpu/fast/canvas')
230 230
231 def test_virtual_root_redundant_with_ancestors(self): 231 def test_virtual_root_redundant_with_ancestors(self):
232 self._assertOptimization({ 232 self._assertOptimization({
233 'virtual/softwarecompositing': '2', 233 'virtual/gpu/fast/canvas': '2',
234 'platform/mac/compositing': '2', 234 'platform/mac/fast/canvas': '2',
235 'platform/win/compositing': '2', 235 'platform/win/fast/canvas': '2',
236 }, { 236 }, {
237 'virtual/softwarecompositing': None, 237 'virtual/gpu/fast/canvas': None,
238 'compositing': '2', 238 'fast/canvas': '2',
239 }, baseline_dirname='virtual/softwarecompositing') 239 }, baseline_dirname='virtual/gpu/fast/canvas')
240 240
241 def test_virtual_root_redundant_with_ancestors_skip_scm_commands(self): 241 def test_virtual_root_redundant_with_ancestors_skip_scm_commands(self):
242 self._assertOptimization({ 242 self._assertOptimization({
243 'virtual/softwarecompositing': '2', 243 'virtual/gpu/fast/canvas': '2',
244 'platform/mac/compositing': '2', 244 'platform/mac/fast/canvas': '2',
245 'platform/win/compositing': '2', 245 'platform/win/fast/canvas': '2',
246 }, { 246 }, {
247 'virtual/softwarecompositing': None, 247 'virtual/gpu/fast/canvas': None,
248 'compositing': '2', 248 'fast/canvas': '2',
249 }, 249 },
250 baseline_dirname='virtual/softwarecompositing', 250 baseline_dirname='virtual/gpu/fast/canvas',
251 expected_files_to_delete=[ 251 expected_files_to_delete=[
252 '/mock-checkout/third_party/WebKit/LayoutTests/virtual/softwarecompo siting/mock-baseline-expected.txt', 252 '/mock-checkout/third_party/WebKit/LayoutTests/virtual/gpu/fast/canv as/mock-baseline-expected.txt',
253 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/composit ing/mock-baseline-expected.txt', 253 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/fast/can vas/mock-baseline-expected.txt',
254 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/composit ing/mock-baseline-expected.txt', 254 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/fast/can vas/mock-baseline-expected.txt',
255 ]) 255 ])
256 256
257 def test_virtual_root_redundant_with_ancestors_skip_scm_commands_with_file_n ot_in_scm(self): 257 def test_virtual_root_redundant_with_ancestors_skip_scm_commands_with_file_n ot_in_scm(self):
258 self._assertOptimization({ 258 self._assertOptimization({
259 'virtual/softwarecompositing': '2', 259 'virtual/gpu/fast/canvas': '2',
260 'platform/mac/compositing': '2', 260 'platform/mac/fast/canvas': '2',
261 'platform/win/compositing': '2', 261 'platform/win/fast/canvas': '2',
262 }, { 262 }, {
263 'virtual/softwarecompositing': None, 263 'virtual/gpu/fast/canvas': None,
264 'compositing': '2', 264 'fast/canvas': '2',
265 }, 265 },
266 baseline_dirname='virtual/softwarecompositing', 266 baseline_dirname='virtual/gpu/fast/canvas',
267 expected_files_to_delete=[ 267 expected_files_to_delete=[
268 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/composit ing/mock-baseline-expected.txt', 268 '/mock-checkout/third_party/WebKit/LayoutTests/platform/mac/fast/can vas/mock-baseline-expected.txt',
269 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/composit ing/mock-baseline-expected.txt', 269 '/mock-checkout/third_party/WebKit/LayoutTests/platform/win/fast/can vas/mock-baseline-expected.txt',
270 ], 270 ],
271 host=MockHost(scm=ExcludingMockSCM(['/mock-checkout/third_party/WebKit/L ayoutTests/virtual/softwarecompositing/mock-baseline-expected.txt']))) 271 host=MockHost(scm=ExcludingMockSCM(['/mock-checkout/third_party/WebKit/L ayoutTests/virtual/gpu/fast/canvas/mock-baseline-expected.txt'])))
272 272
273 def test_virtual_root_not_redundant_with_ancestors(self): 273 def test_virtual_root_not_redundant_with_ancestors(self):
274 self._assertOptimization({ 274 self._assertOptimization({
275 'virtual/softwarecompositing': '2', 275 'virtual/gpu/fast/canvas': '2',
276 'platform/mac/compositing': '1', 276 'platform/mac/fast/canvas': '1',
277 }, { 277 }, {
278 'virtual/softwarecompositing': '2', 278 'virtual/gpu/fast/canvas': '2',
279 'platform/mac/compositing': '1', 279 'platform/mac/fast/canvas': '1',
280 }, baseline_dirname='virtual/softwarecompositing') 280 }, baseline_dirname='virtual/gpu/fast/canvas')
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py ('k') | Tools/Scripts/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698