Index: Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py |
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py |
index 4782c1aea5fc5df895648f8a54a5b44461916f07..3d0cd583d98d259f93619403d916d75cee497625 100644 |
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py |
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py |
@@ -135,16 +135,21 @@ class BotTestExpectations(object): |
# FIXME: Get this from the json instead of hard-coding it. |
RESULT_TYPES_TO_IGNORE = ['N', 'X', 'Y'] |
- def __init__(self, results_json): |
+ # specifiers arg is used in unittests to avoid the static dependency on builders. |
+ def __init__(self, results_json, specifiers=None): |
Dirk Pranke
2014/05/29 18:25:21
Can you make specifiers be required and just pass
Dirk Pranke
2014/05/29 21:06:46
I think you missed this comment?
|
self.results_json = results_json |
+ self.specifiers = specifiers or set(builders.specifiers_for_builder(results_json.builder_name)) |
def _line_from_test_and_flaky_types_and_bug_urls(self, test_path, flaky_types, bug_urls): |
line = TestExpectationLine() |
line.original_string = test_path |
line.name = test_path |
line.filename = test_path |
- line.specifiers = bug_urls if bug_urls else "" |
+ line.path = test_path # FIXME: Should this be normpath? |
+ line.matching_tests = [test_path] |
+ line.bugs = bug_urls if bug_urls else ["Bug(gardener)"] |
line.expectations = sorted(map(self.results_json.expectation_for_type, flaky_types)) |
+ line.specifiers = self.specifiers |
return line |
def flakes_by_path(self, only_ignore_very_flaky): |