[PATCH] D47581: [LNT] Fix use of field index in daily report
John Brawn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 4 06:12:32 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL333896: Fix use of field index in daily report (authored by john.brawn, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47581?vs=149471&id=149742#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47581
Files:
lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
lnt/trunk/tests/server/ui/V4Pages.py
Index: lnt/trunk/tests/server/ui/V4Pages.py
===================================================================
--- lnt/trunk/tests/server/ui/V4Pages.py
+++ lnt/trunk/tests/server/ui/V4Pages.py
@@ -181,6 +181,13 @@
for row in table.findall("./tbody/tr")]
+def get_table_links(table):
+ return [[link.get("href")
+ for cell in row.findall("./td")
+ for link in cell.findall("a")]
+ for row in table.findall("./tbody/tr")]
+
+
def check_row_is_in_table(table, expected_row_content):
body_content = get_table_body_content(table)
assert expected_row_content in body_content, \
@@ -195,6 +202,13 @@
(expected_content, body_content)
+def check_table_links(table, expected_content):
+ body_content = get_table_links(table)
+ assert expected_content == body_content, \
+ "Expected table links %s, found %s" % \
+ (expected_content, body_content)
+
+
def check_body_result_table(client, url, fieldname, expected_content):
table = get_results_table(client, url, fieldname)
check_table_content(table, expected_content)
@@ -435,6 +449,11 @@
["", "machine2", "1.0000", "-", "900.00%", ""],
["test2", ""],
["", "machine2", "FAIL", "-", "PASS", ""]])
+ check_table_links(result_table_20120504,
+ [[],
+ ["/db_default/v4/nts/graph?plot.0=2.4.3&highlight_run=6"],
+ [],
+ ["/db_default/v4/nts/graph?plot.0=2.5.3&highlight_run=6"]])
check_body_nr_tests_table(
client, '/v4/nts/daily_report/2012/5/04',
@@ -453,6 +472,15 @@
["", "machine2", "1.0000", '-', '20.00%', ""],
["test_mhash_on_run", ""],
["", "machine2", "1.0000", '-', '20.00%', ""], ])
+ check_table_links(result_table_20120513,
+ [[],
+ ['/db_default/v4/nts/graph?plot.0=2.6.3&highlight_run=9'],
+ [],
+ ['/db_default/v4/nts/graph?plot.0=2.7.3&highlight_run=9'],
+ [],
+ ['/db_default/v4/nts/graph?plot.0=2.8.3&highlight_run=9'],
+ [],
+ ['/db_default/v4/nts/graph?plot.0=2.9.3&highlight_run=9']])
sparkline_test6_xml = \
get_sparkline(result_table_20120513, "test6", "machine2")
Index: lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
===================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
+++ lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
@@ -247,7 +247,7 @@
<td style="{{ styles.td }}"> </td>
<td class="machine-name" style="{{ styles.td }}"><a href="{{
ts_url}}/graph?plot.0={{machine.id}}.{{test.id}}.{{
- field.index}}&highlight_run={{key_run.id}}">{{
+ report.ts.get_field_index(field)}}&highlight_run={{key_run.id}}">{{
machine.name}}</a></td>
{%- set first_result_shown = false -%}
{%- for day_result in day_results|reverse -%}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47581.149742.patch
Type: text/x-patch
Size: 3220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180604/d2d925e1/attachment.bin>
More information about the llvm-commits
mailing list