Modified: trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations.py (105451 => 105452)
--- trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations.py 2012-01-19 22:56:14 UTC (rev 105451)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations.py 2012-01-19 23:01:24 UTC (rev 105452)
@@ -90,13 +90,13 @@
def _handle_error_message(self, lineno, message, confidence):
pass
- def check_test_expectations(self, expectations_str, tests=None, overrides=None):
+ def check_test_expectations(self, expectations_str, test_configuration, tests=None, overrides=None):
err = None
expectations = None
try:
expectations = test_expectations.TestExpectations(
port=self._port_obj, expectations=expectations_str, tests=tests,
- test_config=self._port_obj.test_configuration(),
+ test_config=test_configuration,
is_lint_mode=True, overrides=overrides)
except test_expectations.ParseError, error:
err = error
@@ -118,8 +118,10 @@
def check(self, lines):
overrides = self._port_obj.test_expectations_overrides()
expectations = '\n'.join(lines)
- self.check_test_expectations(expectations_str=expectations,
- tests=None,
- overrides=overrides)
+ for test_configuration in self._port_obj.all_test_configurations():
+ self.check_test_expectations(expectations_str=expectations,
+ test_configuration=test_configuration,
+ tests=None,
+ overrides=overrides)
# Warn tabs in lines as well
self.check_tabs(lines)
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py (105451 => 105452)
--- trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py 2012-01-19 22:56:14 UTC (rev 105451)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py 2012-01-19 23:01:24 UTC (rev 105452)
@@ -76,11 +76,52 @@
self._expect_port_for_expectations_path(None, "/")
self._expect_port_for_expectations_path("ChromiumMacPort", "/mock-checkout/LayoutTests/chromium-mac/test_expectations.txt")
+ def test_check_covers_all_configurations(self):
+ checker = TestExpectationsChecker('test/test_expectations.txt', self._error_collector, host=MockHost())
+ output = []
+
+ def mock_check_test_expectations(expectations_str, test_configuration, tests, overrides, output=output):
+ output.append(str(test_configuration))
+ checker.check_test_expectations = mock_check_test_expectations
+ checker.check(lines="")
+
+ expected_output = """<leopard, x86, debug, cpu>
+<leopard, x86, debug, gpu>
+<leopard, x86, release, cpu>
+<leopard, x86, release, gpu>
+<snowleopard, x86, debug, cpu>
+<snowleopard, x86, debug, gpu>
+<snowleopard, x86, release, cpu>
+<snowleopard, x86, release, gpu>
+<xp, x86, debug, cpu>
+<xp, x86, debug, gpu>
+<xp, x86, release, cpu>
+<xp, x86, release, gpu>
+<vista, x86, debug, cpu>
+<vista, x86, debug, gpu>
+<vista, x86, release, cpu>
+<vista, x86, release, gpu>
+<win7, x86, debug, cpu>
+<win7, x86, debug, gpu>
+<win7, x86, release, cpu>
+<win7, x86, release, gpu>
+<lucid, x86, debug, cpu>
+<lucid, x86, debug, gpu>
+<lucid, x86, release, cpu>
+<lucid, x86, release, gpu>
+<lucid, x86_64, debug, cpu>
+<lucid, x86_64, debug, gpu>
+<lucid, x86_64, release, cpu>
+<lucid, x86_64, release, gpu>"""
+
+ self.assertEqual("\n".join(output), expected_output)
+
def assert_lines_lint(self, lines, expected):
self._error_collector.reset_errors()
checker = TestExpectationsChecker('test/test_expectations.txt',
self._error_collector, host=MockHost())
checker.check_test_expectations(expectations_str='\n'.join(lines),
+ test_configuration=checker._port_obj.test_configuration(),
tests=[self._test_file],
overrides=None)
checker.check_tabs(lines)