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

Side by Side Diff: webkit/tools/layout_tests/layout_package/test_expectations.py

Issue 56117: Fix calculation of whether we've seen a more precise path for a given test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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 | « no previous file | 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 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 """A helper class for reading in and dealing with tests expectations 5 """A helper class for reading in and dealing with tests expectations
6 for layout tests. 6 for layout tests.
7 """ 7 """
8 8
9 import os 9 import os
10 import re 10 import re
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 """ 376 """
377 if not test in self._test_list_paths: 377 if not test in self._test_list_paths:
378 return False 378 return False
379 379
380 prev_base_path = self._test_list_paths[test] 380 prev_base_path = self._test_list_paths[test]
381 if (prev_base_path == os.path.normpath(test_list_path)): 381 if (prev_base_path == os.path.normpath(test_list_path)):
382 self._AddError(lineno, 'Duplicate expectations.', test) 382 self._AddError(lineno, 'Duplicate expectations.', test)
383 return True 383 return True
384 384
385 # Check if we've already seen a more precise path. 385 # Check if we've already seen a more precise path.
386 return prev_base_path.startswith(test_list_path) 386 return prev_base_path.startswith(os.path.normpath(test_list_path))
387 387
388 def _AddError(self, lineno, msg, path): 388 def _AddError(self, lineno, msg, path):
389 self._errors.append('\nLine:%s %s\n%s' % (lineno, msg, path)) 389 self._errors.append('\nLine:%s %s\n%s' % (lineno, msg, path))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698