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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

Issue 302003009: Make rebaselining not use gigabytes of memory. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cleanup style Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index 0c77183f0511110d333abb0455cfb47b5190ce07..ff3f0f19aaeda53a78a0c152cf55558b60edae0c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -1026,21 +1026,24 @@ class TestExpectations(object):
def has_warnings(self):
return self._has_warnings
- def remove_configuration_from_test(self, test, test_configuration):
+ def remove_configurations(self, removals):
expectations_to_remove = []
modified_expectations = []
- for expectation in self._expectations:
- if expectation.name != test or not expectation.parsed_expectations:
- continue
- if test_configuration not in expectation.matching_configurations:
- continue
-
- expectation.matching_configurations.remove(test_configuration)
- if expectation.matching_configurations:
- modified_expectations.append(expectation)
- else:
- expectations_to_remove.append(expectation)
+ for removal in removals:
Dirk Pranke 2014/06/01 21:25:33 Nit: I'd probably change this to 'for test, test_c
ojan 2014/06/02 01:41:15 Indeed. It's clearly been a while since I've writt
+ test = removal[0]
+ test_configuration = removal[1]
+ for expectation in self._expectations:
+ if expectation.name != test or not expectation.parsed_expectations:
+ continue
+ if test_configuration not in expectation.matching_configurations:
+ continue
+
+ expectation.matching_configurations.remove(test_configuration)
+ if expectation.matching_configurations:
+ modified_expectations.append(expectation)
+ else:
+ expectations_to_remove.append(expectation)
for expectation in expectations_to_remove:
index = self._expectations.index(expectation)

Powered by Google App Engine
This is Rietveld 408576698