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

Unified Diff: build/android/pylib/results/presentation/test_results_presentation.py

Issue 2873723002: Add link to flakiness dashboard for each test case (Closed)
Patch Set: remove crashed testcase Created 3 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
« no previous file with comments | « no previous file | tools/mb/mb.py » ('j') | tools/mb/mb.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/results/presentation/test_results_presentation.py
diff --git a/build/android/pylib/results/presentation/test_results_presentation.py b/build/android/pylib/results/presentation/test_results_presentation.py
index e82b16e544cad44767dcbfd80b2daa20032c38c8..e7463a6d6f168c84f1d2b92c4d372be4dcadecf1 100755
--- a/build/android/pylib/results/presentation/test_results_presentation.py
+++ b/build/android/pylib/results/presentation/test_results_presentation.py
@@ -97,7 +97,15 @@ def action_cell(action, data, html_class):
}
-def logs_cell(result):
+def flakiness_dashbord_link(test_name, suite_name):
+ url_args = urllib.urlencode([
+ ('testType', suite_name),
+ ('tests', test_name)])
+ return ('https://test-results.appspot.com/'
+ 'dashboards/flakiness_dashboard.html#%s' % url_args)
+
+
+def logs_cell(result, test_name, suite_name):
"""Formats result logs data for processing in jinja template."""
link_list = []
for name, href in result.get('links', {}).iteritems():
@@ -105,7 +113,10 @@ def logs_cell(result):
data=name,
href=href,
target=LinkTarget.NEW_TAB))
-
+ link_list.append(link(
+ data='flakiness',
jbudorick 2017/05/11 18:21:08 nit: 4 space indent
BigBossZhiling 2017/05/11 21:47:56 Done.
+ href=flakiness_dashbord_link(test_name, suite_name),
+ target=LinkTarget.NEW_TAB))
if link_list:
return links_cell(link_list)
else:
@@ -128,7 +139,7 @@ def status_class(status):
return status
-def create_test_table(results_dict, cs_base_url):
+def create_test_table(results_dict, cs_base_url, suite_name):
"""Format test data for injecting into HTML table."""
header_row = [
@@ -161,7 +172,7 @@ def create_test_table(results_dict, cs_base_url):
html_class=('center %s' %
status_class(result['status']))),
cell(data=result['elapsed_time_ms']), # elapsed_time_ms
jbudorick 2017/05/11 18:21:08 nit: if we're going to have trailing comments line
BigBossZhiling 2017/05/11 21:47:56 Done.
- logs_cell(result), # logs
+ logs_cell(result, test_name, suite_name), # logs
pre_cell(data=result['output_snippet'], # output_snippet
html_class='left'),
])
@@ -266,7 +277,8 @@ def results_to_html(results_dict, cs_base_url, bucket, test_name,
builder_name, build_number):
"""Convert list of test results into html format."""
- test_rows_header, test_rows = create_test_table(results_dict, cs_base_url)
+ test_rows_header, test_rows = create_test_table(results_dict, cs_base_url,
+ test_name)
suite_rows_header, suite_rows, suite_row_footer = create_suite_table(
results_dict)
« no previous file with comments | « no previous file | tools/mb/mb.py » ('j') | tools/mb/mb.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698