Modified: trunk/Tools/ChangeLog (92860 => 92861)
--- trunk/Tools/ChangeLog 2011-08-11 16:50:25 UTC (rev 92860)
+++ trunk/Tools/ChangeLog 2011-08-11 16:56:28 UTC (rev 92861)
@@ -1,5 +1,16 @@
2011-08-11 Dimitri Glazkov <[email protected]>
+ New expectation entries should be placed next to existing ones.
+ https://bugs.webkit.org/show_bug.cgi?id=66066
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py: Added the notion of insertion point,
+ which is computed as the last found reference to the same test.
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: Added and adjusted unit tests.
+
+2011-08-11 Dimitri Glazkov <[email protected]>
+
Unreviewed, rolling out r92847.
http://trac.webkit.org/changeset/92847
https://bugs.webkit.org/show_bug.cgi?id=65986
@@ -9,6 +20,17 @@
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checker_unittest.py:
+2011-08-11 Dimitri Glazkov <[email protected]>
+
+ Unreviewed, rolling out r92847.
+ http://trac.webkit.org/changeset/92847
+ https://bugs.webkit.org/show_bug.cgi?id=65986
+
+ Broke check-webkit-style
+
+ * Scripts/webkitpy/style/checker.py:
+ * Scripts/webkitpy/style/checker_unittest.py:
+
2011-08-11 Pierre Rossi <[email protected]>
[Qt] autotests shouldn't require config.h in the style check
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (92860 => 92861)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2011-08-11 16:50:25 UTC (rev 92860)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2011-08-11 16:56:28 UTC (rev 92861)
@@ -654,7 +654,9 @@
expectation_lines = self._test_to_expectation_lines.get(test, [])
remaining_configurations = test_config_set.copy()
bug_ids = self._get_valid_bug_ids(parsed_bug_modifiers)
+ new_expectation_line_insertion_point = len(self._expectation_lines)
remove_expectations = expectation_set == set([PASS]) and test not in self._tests_with_directory_paths
+
for expectation_line in expectation_lines:
if expectation_line.matching_configurations == remaining_configurations:
# Tweak expectations on existing line.
@@ -675,6 +677,7 @@
# 2) Finish looking, since there will be no more remaining configs to test for.
expectation_line.matching_configurations -= remaining_configurations
updated_expectations.append(expectation_line)
+ new_expectation_line_insertion_point = self._expectation_lines.index(expectation_line) + 1
break
elif expectation_line.matching_configurations <= remaining_configurations:
# Remove existing expectation line.
@@ -686,11 +689,12 @@
if intersection:
expectation_line.matching_configurations -= intersection
updated_expectations.append(expectation_line)
+ new_expectation_line_insertion_point = self._expectation_lines.index(expectation_line) + 1
if not remove_expectations:
new_expectation_line = self._create_new_line(test, bug_ids, remaining_configurations, expectation_set)
updated_expectations.append(new_expectation_line)
- self._expectation_lines.append(new_expectation_line)
+ self._expectation_lines.insert(new_expectation_line_insertion_point, new_expectation_line)
return updated_expectations
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py (92860 => 92861)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py 2011-08-11 16:50:25 UTC (rev 92860)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py 2011-08-11 16:56:28 UTC (rev 92861)
@@ -878,6 +878,14 @@
BUGX1 MAC : failures/expected/keyboard.html = TEXT
BUG_NEWLY_CREATED WIN RELEASE CPU : failures/expected/keyboard.html = IMAGE""", 1, test_configs=self.WIN_RELEASE_CPU_CONFIGS)
+ def test_update_expectation_relative(self):
+ self.assert_update_roundtrip("""
+BUGX1 XP RELEASE : failures/expected/keyboard.html = TEXT
+BUGX2 MAC : failures/expected/audio.html = TEXT""", 'failures/expected/keyboard.html', set([IMAGE]), """
+BUGX1 XP RELEASE GPU : failures/expected/keyboard.html = TEXT
+BUGAWESOME XP RELEASE CPU : failures/expected/keyboard.html = IMAGE
+BUGX2 MAC : failures/expected/audio.html = TEXT""", 2, parsed_bug_modifiers=['BUGAWESOME'])
+
def test_update_expectation_multiple(self):
in_string = """
BUGX1 WIN : failures/expected/keyboard.html = IMAGE
@@ -892,16 +900,16 @@
BUGX1 XP DEBUG CPU : failures/expected/keyboard.html = IMAGE
BUGX1 XP GPU : failures/expected/keyboard.html = IMAGE
BUGX1 VISTA WIN7 : failures/expected/keyboard.html = IMAGE
-BUGX2 WIN : failures/expected/audio.html = IMAGE
-BUG_UPDATE1 XP RELEASE CPU : failures/expected/keyboard.html = IMAGE+TEXT""")
+BUG_UPDATE1 XP RELEASE CPU : failures/expected/keyboard.html = IMAGE+TEXT
+BUGX2 WIN : failures/expected/audio.html = IMAGE""")
editor.update_expectation(test, set([TestConfiguration('xp', 'x86', 'debug', 'cpu')]), set([TEXT]), ['BUG_UPDATE2'])
self.assertEquals(TestExpectationSerializer.list_to_string(expectation_lines, converter), """
BUGX1 XP GPU : failures/expected/keyboard.html = IMAGE
BUGX1 VISTA WIN7 : failures/expected/keyboard.html = IMAGE
-BUGX2 WIN : failures/expected/audio.html = IMAGE
+BUG_UPDATE2 XP DEBUG CPU : failures/expected/keyboard.html = TEXT
BUG_UPDATE1 XP RELEASE CPU : failures/expected/keyboard.html = IMAGE+TEXT
-BUG_UPDATE2 XP DEBUG CPU : failures/expected/keyboard.html = TEXT""")
+BUGX2 WIN : failures/expected/audio.html = IMAGE""")
editor.update_expectation(test, self.WIN_RELEASE_CPU_CONFIGS, set([CRASH]), ['BUG_UPDATE3'])
self.assertEquals(TestExpectationSerializer.list_to_string(expectation_lines, converter), """
@@ -909,22 +917,22 @@
BUGX1 WIN7 RELEASE GPU : failures/expected/keyboard.html = IMAGE
BUGX1 WIN7 DEBUG : failures/expected/keyboard.html = IMAGE
BUGX1 VISTA XP GPU : failures/expected/keyboard.html = IMAGE
-BUGX2 WIN : failures/expected/audio.html = IMAGE
BUG_UPDATE2 XP DEBUG CPU : failures/expected/keyboard.html = TEXT
-BUG_UPDATE3 WIN RELEASE CPU : failures/expected/keyboard.html = CRASH""")
+BUG_UPDATE3 WIN RELEASE CPU : failures/expected/keyboard.html = CRASH
+BUGX2 WIN : failures/expected/audio.html = IMAGE""")
editor.update_expectation(test, self.RELEASE_CONFIGS, set([FAIL]), ['BUG_UPDATE4'])
self.assertEquals(TestExpectationSerializer.list_to_string(expectation_lines, converter), """
BUGX1 XP DEBUG GPU : failures/expected/keyboard.html = IMAGE
BUGX1 VISTA WIN7 DEBUG : failures/expected/keyboard.html = IMAGE
-BUGX2 WIN : failures/expected/audio.html = IMAGE
BUG_UPDATE2 XP DEBUG CPU : failures/expected/keyboard.html = TEXT
-BUG_UPDATE4 RELEASE : failures/expected/keyboard.html = FAIL""")
+BUG_UPDATE4 RELEASE : failures/expected/keyboard.html = FAIL
+BUGX2 WIN : failures/expected/audio.html = IMAGE""")
editor.update_expectation(test, set(self.test_port.all_test_configurations()), set([TIMEOUT]), ['BUG_UPDATE5'])
self.assertEquals(TestExpectationSerializer.list_to_string(expectation_lines, converter), """
-BUGX2 WIN : failures/expected/audio.html = IMAGE
-BUG_UPDATE5 : failures/expected/keyboard.html = TIMEOUT""")
+BUG_UPDATE5 : failures/expected/keyboard.html = TIMEOUT
+BUGX2 WIN : failures/expected/audio.html = IMAGE""")
if __name__ == '__main__':