summaryrefslogtreecommitdiff
path: root/chromium/testing/scripts/common.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 15:28:34 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 13:54:51 +0000
commit2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch)
treeeb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/testing/scripts/common.py
parentb014812705fc80bff0a5c120dfcef88f349816dc (diff)
downloadqtwebengine-chromium-2a19c63448c84c1805fb1a585c3651318bb86ca7.tar.gz
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/testing/scripts/common.py')
-rw-r--r--chromium/testing/scripts/common.py29
1 files changed, 27 insertions, 2 deletions
diff --git a/chromium/testing/scripts/common.py b/chromium/testing/scripts/common.py
index 3e9492e12a4..2217d07b50a 100644
--- a/chromium/testing/scripts/common.py
+++ b/chromium/testing/scripts/common.py
@@ -138,8 +138,7 @@ def parse_common_test_results(json_results, test_separator='/'):
# TODO(dpranke): crbug.com/357866 - we should simplify the handling of
# both the return code and parsing the actual results, below.
- passing_statuses = ('PASS', 'SLOW', 'NEEDSREBASELINE',
- 'NEEDSMANUALREBASELINE')
+ passing_statuses = ('PASS', 'SLOW', 'NEEDSREBASELINE')
for test, result in convert_trie_to_flat_paths(
json_results['tests']).iteritems():
@@ -165,6 +164,32 @@ def parse_common_test_results(json_results, test_separator='/'):
return results
+def get_gtest_summary_passes(output):
+ """Returns a mapping of test to boolean indicating if the test passed.
+
+ Only partially parses the format. This code is based on code in tools/build,
+ specifically
+ https://chromium.googlesource.com/chromium/tools/build/+/17fef98756c5f250b20bf716829a0004857235ff/scripts/slave/recipe_modules/test_utils/util.py#189
+ """
+ if not output:
+ return {}
+
+ mapping = {}
+
+ for cur_iteration_data in output.get('per_iteration_data', []):
+ for test_fullname, results in cur_iteration_data.iteritems():
+ # Results is a list with one entry per test try. Last one is the final
+ # result.
+ last_result = results[-1]
+
+ if last_result['status'] == 'SUCCESS':
+ mapping[test_fullname] = True
+ elif last_result['status'] != 'SKIPPED':
+ mapping[test_fullname] = False
+
+ return mapping
+
+
def extract_filter_list(filter_list):
"""Helper for isolated script test wrappers. Parses the
--isolated-script-test-filter command line argument. Currently, double-colon