Changeset 76288 in webkit
- Timestamp:
- Jan 20, 2011 3:05:30 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r76286 r76288 1 2011-01-20 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 nrwt: remove fs refs from printing, test_failures, test_expectations, text_diff 6 7 https://bugs.webkit.org/show_bug.cgi?id=52756 8 9 * Scripts/webkitpy/layout_tests/layout_package/printing.py: 10 * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py: 11 * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py: 12 * Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py: 13 * Scripts/webkitpy/layout_tests/layout_package/test_failures.py: 14 * Scripts/webkitpy/layout_tests/test_types/text_diff.py: 15 1 16 2011-01-20 Mansi Mithal <mansi.mithal@nokia.com> 2 17 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/printing.py
r72708 r76288 32 32 import logging 33 33 import optparse 34 import os35 import pdb36 34 37 35 from webkitpy.layout_tests.layout_package import metered_stream … … 412 410 413 411 next_test = test_list[self._current_test_number] 414 next_dir = os.path.dirname(412 next_dir = self._port._filesystem.dirname( 415 413 self._port.relative_test_filename(next_test)) 416 414 if self._current_progress_str == "": … … 438 436 439 437 next_test = test_list[self._current_test_number] 440 next_dir = os.path.dirname(438 next_dir = self._port._filesystem.dirname( 441 439 self._port.relative_test_filename(next_test)) 442 440 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
r75626 r76288 30 30 """Unit tests for printing.py.""" 31 31 32 import os33 32 import optparse 34 import pdb35 import sys36 33 import unittest 37 34 import logging … … 139 136 elif result_type == test_expectations.CRASH: 140 137 failures = [test_failures.FailureCrash()] 141 path = os.path.join(self._port.layout_tests_dir(), test)138 path = self._port._filesystem.join(self._port.layout_tests_dir(), test) 142 139 return test_results.TestResult(path, failures=failures, test_run_time=run_time) 143 140 144 141 def get_result_summary(self, tests, expectations_str): 145 test_paths = [ os.path.join(self._port.layout_tests_dir(), test) for142 test_paths = [self._port._filesystem.join(self._port.layout_tests_dir(), test) for 146 143 test in tests] 147 144 expectations = test_expectations.TestExpectations( -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
r75626 r76288 33 33 34 34 import logging 35 import os36 35 import re 37 import sys38 36 39 37 import webkitpy.thirdparty.simplejson as simplejson … … 323 321 324 322 self._port = port 323 self._fs = port._filesystem 325 324 self._expectations = expectations 326 325 self._full_test_list = full_test_list … … 691 690 test_list_path) 692 691 693 full_path = os.path.join(self._port.layout_tests_dir(),694 test_list_path)695 full_path = os.path.normpath(full_path)692 full_path = self._fs.join(self._port.layout_tests_dir(), 693 test_list_path) 694 full_path = self._fs.normpath(full_path) 696 695 # WebKit's way of skipping tests is to add a -disabled suffix. 697 696 # So we should consider the path existing if the path or the … … 737 736 # files and nodes being categories. 738 737 739 path = os.path.join(self._port.layout_tests_dir(), test_list_path)740 path = os.path.normpath(path)741 if self._ port.path_isdir(path):738 path = self._fs.join(self._port.layout_tests_dir(), test_list_path) 739 path = self._fs.normpath(path) 740 if self._fs.isdir(path): 742 741 # this is a test category, return all the tests of the category. 743 path = os.path.join(path, '')742 path = self._fs.join(path, '') 744 743 745 744 return [test for test in self._full_test_list if test.startswith(path)] … … 818 817 self._remove_from_sets(test, self._result_type_to_tests) 819 818 820 self._test_list_paths[test] = os.path.normpath(test_list_path)819 self._test_list_paths[test] = self._fs.normpath(test_list_path) 821 820 822 821 def _remove_from_sets(self, test, dict): … … 839 838 840 839 prev_base_path = self._test_list_paths[test] 841 if (prev_base_path == os.path.normpath(test_list_path)):840 if (prev_base_path == self._fs.normpath(test_list_path)): 842 841 if (not allow_overrides or test in self._overridding_tests): 843 842 if allow_overrides: … … 855 854 856 855 # Check if we've already seen a more precise path. 857 return prev_base_path.startswith( os.path.normpath(test_list_path))856 return prev_base_path.startswith(self._fs.normpath(test_list_path)) 858 857 859 858 def _add_error(self, lineno, msg, path): -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
r75626 r76288 30 30 """Unit tests for test_expectations.py.""" 31 31 32 import os33 import sys34 32 import unittest 35 33 … … 83 81 def __init__(self, testFunc, setUp=None, tearDown=None, description=None): 84 82 self._port = port.get('test', None) 83 self._fs = self._port._filesystem 85 84 self._exp = None 86 85 unittest.TestCase.__init__(self, testFunc) 87 86 88 87 def get_test(self, test_name): 89 return os.path.join(self._port.layout_tests_dir(), test_name)88 return self._fs.join(self._port.layout_tests_dir(), test_name) 90 89 91 90 def get_basic_tests(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
r75332 r76288 30 30 """Classes for failures that occur during tests.""" 31 31 32 import os33 32 import test_expectations 34 33 … … 122 121 The relative windows path to the output filename 123 122 """ 124 return os.path.splitext(filename)[0] + modifier 123 # FIXME: technically this breaks if files don't use ".ext" to indicate 124 # the extension, but passing in a Filesystem object here is a huge 125 # hassle. 126 return filename[filename.rfind('.')] + modifier 125 127 126 128 -
trunk/Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
r74362 r76288 34 34 """ 35 35 36 from __future__ import with_statement37 38 import codecs39 36 import errno 40 37 import logging 41 import os.path42 38 43 39 from webkitpy.layout_tests.layout_package import test_failures
Note: See TracChangeset
for help on using the changeset viewer.