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

Side by Side Diff: build/android/pylib/results/json_results.py

Issue 2183053004: Add stack as output_snippet in result. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 import itertools 6 import itertools
7 import json 7 import json
8 8
9 from pylib.base import base_test_result 9 from pylib.base import base_test_result
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 iteration_data = collections.defaultdict(list) 92 iteration_data = collections.defaultdict(list)
93 if isinstance(test_run_result, list): 93 if isinstance(test_run_result, list):
94 results_iterable = itertools.chain(*(t.GetAll() for t in test_run_result)) 94 results_iterable = itertools.chain(*(t.GetAll() for t in test_run_result))
95 else: 95 else:
96 results_iterable = test_run_result.GetAll() 96 results_iterable = test_run_result.GetAll()
97 97
98 for r in results_iterable: 98 for r in results_iterable:
99 iteration_data[r.GetName()].append({ 99 iteration_data[r.GetName()].append({
100 'status': status_as_string(r.GetType()), 100 'status': status_as_string(r.GetType()),
101 'elapsed_time_ms': r.GetDuration(), 101 'elapsed_time_ms': r.GetDuration(),
102 'output_snippet': '', 102 'output_snippet': r.GetLog(),
103 'losless_snippet': '', 103 'losless_snippet': '',
104 'output_snippet_base64:': '', 104 'output_snippet_base64:': '',
105 }) 105 })
106 106
107 all_tests = all_tests.union(set(iteration_data.iterkeys())) 107 all_tests = all_tests.union(set(iteration_data.iterkeys()))
108 per_iteration_data.append(iteration_data) 108 per_iteration_data.append(iteration_data)
109 109
110 return { 110 return {
111 'global_tags': [], 111 'global_tags': [],
112 'all_tests': sorted(list(all_tests)), 112 'all_tests': sorted(list(all_tests)),
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 testsuite_runs = json_results['per_iteration_data'] 156 testsuite_runs = json_results['per_iteration_data']
157 for testsuite_run in testsuite_runs: 157 for testsuite_run in testsuite_runs:
158 for test, test_runs in testsuite_run.iteritems(): 158 for test, test_runs in testsuite_run.iteritems():
159 results_list.extend( 159 results_list.extend(
160 [base_test_result.BaseTestResult(test, 160 [base_test_result.BaseTestResult(test,
161 string_as_status(tr['status']), 161 string_as_status(tr['status']),
162 duration=tr['elapsed_time_ms']) 162 duration=tr['elapsed_time_ms'])
163 for tr in test_runs]) 163 for tr in test_runs])
164 return results_list 164 return results_list
165 165
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698