summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-07-05 20:16:40 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-07-07 23:52:08 -0400
commit9ef14dc6ca29316eb88cb325f100bfb87c18c3a9 (patch)
tree33eeb6460629fbc9480d0e8450c41add63a32c71
parent26217bfe044a26f3d808884d5a359cb57a8ed778 (diff)
Include test duration in per-commit report
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rwxr-xr-xci/test-job-done.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/ci/test-job-done.sh b/ci/test-job-done.sh
index a92f0e2..411cbb6 100755
--- a/ci/test-job-done.sh
+++ b/ci/test-job-done.sh
@@ -47,13 +47,15 @@ git_commit_html()
echo '<table class="table">'
- for STATUS in $(find $OUTPUT -name status); do
- TESTNAME=$(basename $(dirname $STATUS))
+ for STATUSFILE in $(find $OUTPUT -name status); do
+ STATUS=$(<$STATUSFILE)
+ DURATION=$(echo $STATUS|grep -Eo '[0-9]+s' || true)
+ TESTNAME=$(basename $(dirname $STATUSFILE))
TESTFILE=$(echo $TESTNAME|cut -d. -f1)
STATUSMSG=Unknown
TABLECLASS=table-secondary
- case $(<$STATUS) in
+ case $STATUS in
*PASSED*)
STATUSMSG=Passed
TABLECLASS=table-success
@@ -73,6 +75,7 @@ git_commit_html()
echo "<tr class=$TABLECLASS>"
echo "<td> $TESTNAME </td>"
echo "<td> $STATUSMSG </td>"
+ echo "<td> $DURATION </td>"
echo "<td> <a href=$TESTNAME/log.br> log </a> </td>"
echo "<td> <a href=$TESTFILE.br> full log </a> </td>"
echo "<td> <a href=$TESTNAME> output directory </a> </td>"