Skip to content

Commit

Permalink
Restore EMPTY status for multi-threaded tests report
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmin committed Oct 8, 2023
1 parent 5b5be20 commit 94de63d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/com/github/report4s/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ private void print_rows() {
suite_md.status);
}
if (suite_md.hasMutiThreads)
print_method_row(i+1, 0, "<span class=\"multiThread\">No support for multi-threaded tests</span>", null, "", suite_md.filename, Status.UNKNOWN, suite_md.status);
print_method_row(i+1, 0, "<span class=\"multiThread\">No support for multi-threaded tests</span>", null, "", suite_md.filename, Status.EMPTY, suite_md.status);
}
}

Expand Down Expand Up @@ -580,8 +580,14 @@ private void print_method_row(
" <td></td>" + "\n" +
" <td>" + name + "</td>" + "\n" +
" <td style=\"text-align:right\">" + time + "</td>" + "\n" +
" <td style=\"text-align:center\"><a target=\"_blank\" href=\"" + file + "\">details</a></td>" + "\n" +
" <td align=\"center\"><img src=\"assets/img/" + icon + "\" class=\"icon\"></td>" + "\n" +
" <td style=\"text-align:center\"><a target=\"_blank\" href=\"" + file + "\">details</a></td>" + "\n");
if (status == Status.EMPTY)
HtmlWriter.println(
" <td align=\"center\"></td>" + "\n");
else
HtmlWriter.println(
" <td align=\"center\"><img src=\"assets/img/" + icon + "\" class=\"icon\"></td>" + "\n");
HtmlWriter.println(
" </tr>");
}

Expand Down
1 change: 1 addition & 0 deletions src/com/github/report4s/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ enum Status {
PASSED_WITH_WARNING,
FAILED_WITHIN_PERCENTAGE,
UNKNOWN,
EMPTY, //for multi-threaded tests
}
4 changes: 4 additions & 0 deletions src/com/github/report4s/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ protected static String getStatusIconFilename(Status status) {
case PASSED_WITH_WARNING:
icon = "incomplete.png";
break;
case EMPTY:
// For multi-threaded tests
icon = "";
break;
default:
// Should never happen!
icon = "unknown.png";
Expand Down

0 comments on commit 94de63d

Please sign in to comment.