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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py

Issue 2125633002: Fill out implementation of UpdateTestExpectations script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@updateTestExpectations2
Patch Set: Quinten's Review Created 4 years, 5 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: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
index 99771a69260ba005092d29eb7c24f1aa7c94ab3d..e742cfe3d18b10e9fbebf1533a20a69b12087419 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
@@ -117,6 +117,33 @@ class BotTestExpectationsTest(unittest.TestCase):
expectations = bot_test_expectations.BotTestExpectations(results_json, BuilderList(BUILDERS), set('test'))
self.assertEqual(expectations.unexpected_results_by_path(), expectations_string)
+ def test_all_results_by_path(self):
+ test_data = {
+ 'tests': {
+ 'foo': {
+ 'multiple_pass.html': {'results': [[4, 'P'], [1, 'P'], [2, 'P']]},
+ 'fail.html': {'results': [[2, 'Z']]},
+ 'all_types.html': {
+ 'results': [[2, 'A'], [1, 'C'], [2, 'F'], [1, 'I'], [1, 'O'], [1, 'N'], [1, 'P'], [1, 'T'],
+ [1, 'Y'], [10, 'X'], [1, 'Z'], [1, 'K']]
+ },
+ 'not_run.html': {'results': []},
+ }
+ }
+ }
+
+ results_json = self._results_json_from_test_data(test_data)
+ expectations = bot_test_expectations.BotTestExpectations(results_json, BuilderList(BUILDERS), set('test'))
+ results_by_path = expectations.all_results_by_path()
+
+ expected_output = {
+ 'foo/multiple_pass.html': ['PASS'],
+ 'foo/fail.html': ['IMAGE+TEXT'],
+ 'foo/all_types.html': ['AUDIO', 'CRASH', 'IMAGE', 'IMAGE+TEXT', 'LEAK', 'MISSING', 'PASS', 'TEXT', 'TIMEOUT']
+ }
+
+ self.assertEqual(results_by_path, expected_output)
+
def test_basic(self):
test_data = {
'tests': {

Powered by Google App Engine
This is Rietveld 408576698