[coreboot-gerrit] New patch to review for coreboot: board_status/to-wiki: Indicate age of test results by background color
Timothy Pearson (tpearson@raptorengineeringinc.com)
gerrit at coreboot.org
Fri Apr 22 00:09:08 CEST 2016
Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14457
-gerrit
commit ff88bb944c9886a0babe47dd17911f21c0ae5c57
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date: Thu Apr 21 17:06:37 2016 -0500
board_status/to-wiki: Indicate age of test results by background color
A major issue with the board-status Wiki page is that it shows all
test results equally regardless of age. As a test result ages it
becomes more likely that the board no longer works peroperly under
coreboot due to code churn.
Visually indicate board-test status "at a glance" by smoothly fading
the background color of the test result from green to yellow to red
as the test result ages. This patch sets the full red transition
to 256 days after test for programming convenience, however the
number of days required to fully "stale" a test result could be
modified relatively easily.
Change-Id: I5a076a6cc17d53fda8e4681e38074fc1f46c0e12
Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
util/board_status/to-wiki/towiki.sh | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/util/board_status/to-wiki/towiki.sh b/util/board_status/to-wiki/towiki.sh
index 9cf8a3c..8a5c221 100755
--- a/util/board_status/to-wiki/towiki.sh
+++ b/util/board_status/to-wiki/towiki.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-export COREBOOT_DIR="../coreboot"
+export COREBOOT_DIR="../coreboot.littlepatches"
export GIT_DIR="$COREBOOT_DIR/.git"
CODE_GITWEB="http://review.coreboot.org/gitweb?p=coreboot.git;a=commitdiff;h="
STATUS_GITWEB="http://review.coreboot.org/gitweb?p=board-status.git;a=blob;hb=HEAD;f="
@@ -412,7 +412,23 @@ EOF
if [ -z "$lastgood" ]; then
echo "| style=\"background:red\" | Unknown"
else
- echo "| style=\"background:lime\" | [[#$vendor/$board|$lastgood]]"
+ lastgood_ts=$(date -d "$lastgood" "+%s")
+ current_ts=$(date "+%s")
+ lastgood_diff=0
+ if [ $lastgood_ts -lt $current_ts ]; then
+ lastgood_diff=$(( $current_ts - $lastgood_ts ))
+ # Convert seconds to days
+ lastgood_diff=$(( $lastgood_diff / 86400 ))
+ # Set maximum age at 255 days for convenience of code
+ if [ $lastgood_diff -gt 255 ]; then
+ lastgood_diff=255
+ fi
+ fi
+ lastgood_diff_hex=$(echo "obase=16; $lastgood_diff" | bc)
+ green_component=$(( 255 - $lastgood_diff ))
+ green_component_hex=$(echo "obase=16; $green_component" | bc)
+ cell_bgcolor=$(echo "#${lastgood_diff_hex}${green_component_hex}00")
+ echo "| style=\"background:${cell_bgcolor}\" | [[#$vendor/$board|$lastgood]]"
fi
echo "| $northbridge_nice"
More information about the coreboot-gerrit
mailing list