Skip to content

Commit 84f934f

Browse files
committed
ui: status: show failed tests and crashes inline
Correlating the results from the runs to "recent failures" and "recent crashes" is a bit inconvenient. I sometimes have to Ctrl-F the name of the branch. Let's try something different - let's show the failures and crashes inline. Hopefully it doesn't get too messy. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 554de60 commit 84f934f

2 files changed

Lines changed: 32 additions & 48 deletions

File tree

ui/status.html

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,25 +87,6 @@ <h3>Continuous testing results</h3>
8787
<div id="contest-tables">
8888
</div>
8989
<br>
90-
<h3>Recent failures</h3>
91-
<table id="recent-fails">
92-
<tr>
93-
<th>Branch</th>
94-
<th>Remote</th>
95-
<th>Test</th>
96-
<th>Result</th>
97-
<th>Retry</th>
98-
</tr>
99-
</table>
100-
<br>
101-
<h3>Recent crashes</h3>
102-
<table id="recent-crashes">
103-
<tr>
104-
<th>Test</th>
105-
<th>Crashes</th>
106-
</tr>
107-
</table>
108-
<br>
10990
<h3>Tests with missing results</h3>
11091
<table id="test-presence">
11192
<tr>

ui/status.js

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -458,34 +458,6 @@ function wrap_link(objA, objB, text)
458458
return "<a href=\"" + url + "\">" + text + "</a>";
459459
}
460460

461-
function load_fails(data_raw)
462-
{
463-
var fail_table = document.getElementById("recent-fails");
464-
var crash_table = document.getElementById("recent-crashes");
465-
466-
$.each(data_raw, function(idx0, v) {
467-
$.each(v.results, function(idx1, r) {
468-
if (r.result != "pass" && nipa_pw_reported(v, r)) {
469-
let i = 0, row = fail_table.insertRow();
470-
row.insertCell(i++).innerHTML = v.branch;
471-
row.insertCell(i++).innerHTML = v.remote;
472-
row.insertCell(i++).innerHTML = r.test;
473-
row.insertCell(i++).innerHTML = colorify_basic(r.result);
474-
if ("retry" in r)
475-
row.insertCell(i++).innerHTML = colorify_basic(r.retry);
476-
}
477-
478-
if ("crashes" in r) {
479-
for (crash of r.crashes) {
480-
let i = 0, row = crash_table.insertRow();
481-
row.insertCell(i++).innerHTML = wrap_link(r, v, r.test);
482-
row.insertCell(i++).innerHTML = crash;
483-
}
484-
}
485-
});
486-
});
487-
}
488-
489461
function load_partial_tests(data)
490462
{
491463
let table = document.getElementById("test-presence");
@@ -741,6 +713,38 @@ function load_result_table_one(data_raw, table, reported, avgs)
741713
cnt.innerHTML = link_to_contest + str_psf.str + "</a>";
742714
res.innerHTML = str_psf.overall;
743715
time.innerHTML = msec_to_str(t_end - t_start);
716+
717+
// Add inline failure and crash rows
718+
$.each(v.results, function(i, r) {
719+
// Always show crashes, they are important
720+
if ("crashes" in r) {
721+
/* keep going */;
722+
} else if (nipa_pw_reported(v, r) != reported) {
723+
return 1;
724+
} else if (r.result == "pass") {
725+
return 1;
726+
}
727+
728+
var frow = table.insertRow();
729+
frow.insertCell(0); // branch - empty
730+
var fcell = frow.insertCell(1);
731+
fcell.innerHTML = r.test;
732+
fcell.setAttribute("style", "text-align: right");
733+
frow.insertCell(2).innerHTML = colorify_basic(r.result);
734+
if ("retry" in r)
735+
frow.insertCell(3).innerHTML = colorify_basic(r.retry);
736+
737+
if ("crashes" in r) {
738+
$.each(r.crashes, function(ci, crash) {
739+
var crow = table.insertRow();
740+
crow.insertCell(0); // branch - empty
741+
var ccell = crow.insertCell(1);
742+
ccell.innerHTML = crash;
743+
ccell.setAttribute("colspan", "4");
744+
ccell.setAttribute("style", "background-color: rgba(255, 0, 0, 0.1)");
745+
});
746+
}
747+
});
744748
} else {
745749
var pend;
746750

@@ -957,7 +961,6 @@ function load_result_table(data_raw, reload)
957961
});
958962

959963
if (!reload) {
960-
load_fails(data_raw);
961964
load_partial_tests(data_raw);
962965
}
963966
}

0 commit comments

Comments
 (0)