Title: [106050] trunk/Tools
- Revision
- 106050
- Author
- [email protected]
- Date
- 2012-01-26 14:58:21 -0800 (Thu, 26 Jan 2012)
Log Message
Unreviewed, rolling out r106038.
http://trac.webkit.org/changeset/106038
https://bugs.webkit.org/show_bug.cgi?id=77142
Caused a bunch of skipped tests to not be skipped. (Requested
by ojan on #webkit).
Patch by Sheriff Bot <[email protected]> on 2012-01-26
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser):
(TestExpectationParser.parse):
(TestExpectationParser._parse_line):
(TestExpectationParser._collect_matching_tests):
(TestExpectations.__init__):
(TestExpectations._add_skipped_tests):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.test_dirs):
(Port.normalize_test_name):
(Port.update_baseline):
(Port.layout_tests_dir):
(Port.relative_perf_test_filename):
(Port.abspath_for_test):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (106049 => 106050)
--- trunk/Tools/ChangeLog 2012-01-26 22:55:26 UTC (rev 106049)
+++ trunk/Tools/ChangeLog 2012-01-26 22:58:21 UTC (rev 106050)
@@ -1,3 +1,27 @@
+2012-01-26 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r106038.
+ http://trac.webkit.org/changeset/106038
+ https://bugs.webkit.org/show_bug.cgi?id=77142
+
+ Caused a bunch of skipped tests to not be skipped. (Requested
+ by ojan on #webkit).
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectationParser):
+ (TestExpectationParser.parse):
+ (TestExpectationParser._parse_line):
+ (TestExpectationParser._collect_matching_tests):
+ (TestExpectations.__init__):
+ (TestExpectations._add_skipped_tests):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.test_dirs):
+ (Port.normalize_test_name):
+ (Port.update_baseline):
+ (Port.layout_tests_dir):
+ (Port.relative_perf_test_filename):
+ (Port.abspath_for_test):
+
2012-01-25 Ojan Vafai <[email protected]>
Parsing test_expecations.txt + Skipped lists takes too long
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (106049 => 106050)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2012-01-26 22:55:26 UTC (rev 106049)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2012-01-26 22:58:21 UTC (rev 106050)
@@ -187,7 +187,6 @@
BUG_MODIFIER_PREFIX = 'bug'
BUG_MODIFIER_REGEX = 'bug\d+'
REBASELINE_MODIFIER = 'rebaseline'
- FAIL_EXPECTATION = 'fail'
SKIP_MODIFIER = 'skip'
SLOW_MODIFIER = 'slow'
WONTFIX_MODIFIER = 'wontfix'
@@ -206,30 +205,15 @@
self._parse_line(expectation_line)
return expectations
- def expectation_for_skipped_test(self, test_name):
- expectation_line = TestExpectationLine()
- expectation_line.original_string = test_name
- expectation_line.modifiers = [TestExpectationParser.SKIP_MODIFIER]
- expectation_line.name = test_name
- expectation_line.expectations = [TestExpectationParser.FAIL_EXPECTATION]
- self._parse_line(expectation_line)
- return expectation_line
-
def _parse_line(self, expectation_line):
if not expectation_line.name:
return
self._check_modifiers_against_expectations(expectation_line)
-
- expectation_line.is_file = self._port.test_isfile(expectation_line.name)
- if not expectation_line.is_file and self._check_path_does_not_exist(expectation_line):
+ if self._check_path_does_not_exist(expectation_line):
return
- if expectation_line.is_file:
- expectation_line.path = expectation_line.name
- else:
- expectation_line.path = self._port.normalize_test_name(expectation_line.name)
-
+ expectation_line.path = self._port.normalize_test_name(expectation_line.name)
self._collect_matching_tests(expectation_line)
self._parse_modifiers(expectation_line)
@@ -301,7 +285,7 @@
expectation_line.matching_tests = [expectation_line.path]
return
- if not expectation_line.is_file:
+ if self._port.test_isdir(expectation_line.path):
# this is a test category, return all the tests of the category.
expectation_line.matching_tests = [test for test in self._full_test_list if test.startswith(expectation_line.path)]
return
@@ -718,6 +702,7 @@
self._model = TestExpectationsModel()
self._parser = TestExpectationParser(port, tests, is_lint_mode)
self._port = port
+ self._test_configuration_converter = TestConfigurationConverter(port.all_test_configurations(), port.configuration_specifier_macros())
self._skipped_tests_warnings = []
self._expectations = self._parser.parse(expectations)
@@ -850,5 +835,6 @@
for index, test in enumerate(self._expectations, start=1):
if test.name and test.name in tests_to_skip:
self._skipped_tests_warnings.append(':%d %s is also in a Skipped file.' % (index, test.name))
- for test_name in tests_to_skip:
- self._model.add_expectation_line(self._parser.expectation_for_skipped_test(test_name), overrides_allowed=True)
+ skipped_tests = '\n'.join(map(lambda test_path: 'BUG_SKIPPED SKIP : %s = FAIL' % test_path, tests_to_skip))
+ for test in self._parser.parse(skipped_tests):
+ self._model.add_expectation_line(test, overrides_allowed=True)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (106049 => 106050)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-01-26 22:55:26 UTC (rev 106049)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-01-26 22:58:21 UTC (rev 106050)
@@ -518,14 +518,6 @@
return filter(lambda x: self._filesystem.isdir(self._filesystem.join(layout_tests_dir, x)),
self._filesystem.listdir(layout_tests_dir))
- @memoized
- def test_isfile(self, test_name):
- """Return True if the test name refers to a directory of tests."""
- # Used by test_expectations.py to apply rules to whole directories.
- test_path = self.abspath_for_test(test_name)
- return self._filesystem.isfile(test_path)
-
- @memoized
def test_isdir(self, test_name):
"""Return True if the test name refers to a directory of tests."""
# Used by test_expectations.py to apply rules to whole directories.
@@ -548,9 +540,7 @@
def normalize_test_name(self, test_name):
"""Returns a normalized version of the test name or test directory."""
- if test_name.endswith('/'):
- return test_name
- if self.test_isdir(test_name):
+ if self.test_isdir(test_name) and not test_name.endswith('/'):
return test_name + '/'
return test_name
@@ -570,10 +560,9 @@
"""
self._filesystem.write_binary_file(baseline_path, data)
- @memoized
def layout_tests_dir(self):
"""Return the absolute path to the top of the LayoutTests directory."""
- return self._filesystem.normpath(self.path_from_webkit_base('LayoutTests'))
+ return self.path_from_webkit_base('LayoutTests')
def perf_tests_dir(self):
"""Return the absolute path to the top of the PerformanceTests directory."""
@@ -708,11 +697,10 @@
assert filename.startswith(self.perf_tests_dir()), "%s did not start with %s" % (filename, self.perf_tests_dir())
return filename[len(self.perf_tests_dir()) + 1:]
- @memoized
def abspath_for_test(self, test_name):
"""Returns the full path to the file for a given test name. This is the
inverse of relative_test_filename()."""
- return self._filesystem.join(self.layout_tests_dir(), test_name)
+ return self._filesystem.normpath(self._filesystem.join(self.layout_tests_dir(), test_name))
def results_directory(self):
"""Absolute path to the place to store the test results (uses --results-directory)."""
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes