summaryrefslogtreecommitdiff
path: root/tcwg-report-ci-status.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tcwg-report-ci-status.sh')
-rwxr-xr-xtcwg-report-ci-status.sh49
1 files changed, 27 insertions, 22 deletions
diff --git a/tcwg-report-ci-status.sh b/tcwg-report-ci-status.sh
index 45142539..b85fb4bb 100755
--- a/tcwg-report-ci-status.sh
+++ b/tcwg-report-ci-status.sh
@@ -12,37 +12,42 @@ for view in "${views[@]}"; do
done
# Print INSTANT PICTURE status
-printf "%-20s | %13s | %13s | %13s |\n" \
- "TODAY PICTURE" "Success" "In progress" "Failed"
-printf "========================================================================\n"
+list_pat=("Success" "In progress" "Failed" "Aborted" "Disabled")
+printf "%-22s | %13s | %13s | %13s | %13s | %13s |\n" "TODAY PICTURE" "${list_pat[@]}"
+printf "========================================================================================================\n"
for view in "${views[@]}"; do
- for pat in "Success" "In progress" "Failed"; do
- nb[$pat]=$(grep -c "tooltip=\"$pat\"" < "/tmp/$view.html")
- all[$pat]=$((all[$pat] + nb[$pat]))
+ printf "%-22s |" "$view"
+ for pat in "${list_pat[@]}"; do
+ nb["$pat"]=$(grep -c "tooltip=\"$pat\"" < "/tmp/$view.html")
+ all["$pat"]=$((all["$pat"] + nb["$pat"]))
+ printf " %13s |" "${nb["$pat"]}"
done
- printf "%-20s | %13s | %13s | %13s |\n" \
- "$view" "${nb[Success]}" "${nb[In progress]}" "${nb[Failed]}"
+ printf "\n"
done
-printf "========================================================================\n"
-printf "%-20s | %13s | %13s | %13s |\n" \
- "TOTAL" "${all[Success]}" "${all[In progress]}" "${all[Failed]}"
+printf "========================================================================================================\n"
+printf "%-22s | %13s | %13s | %13s | %13s | %13s |\n" \
+ "TOTAL" "${all[Success]}" "${all[In progress]}" "${all[Failed]}" "${all[Aborted]}" "${all[Disabled]}"
echo ""
echo ""
# Print WHEATHER PICTURE status
-printf "%-20s | %13s | %13s | %13s | %13s | %13s |\n" \
- "WHEATHER PICTURE" "sunny" "partly-cloudy" "cloudy" "rainy" "pouring"
-printf "========================================================================================================\n"
+list_name=("No-fail" "1-fail" "2-fails" "3-fails" "4-fails" "All-fails")
+list_pat=("No recent" "1 out of the last 5" "2 out of the last 5" "3 out of the last 5" "4 out of the last 5" "All recent")
+
+printf "%-22s | %13s | %13s | %13s | %13s | %13s | %13s |\n" "WHEATHER (5 last runs)" "${list_name[@]}"
+printf "========================================================================================================================\n"
for view in "${views[@]}"; do
- for pat in "sunny" "partly-cloudy" "cloudy" "rainy" "pouring"; do
- nb[$pat]=$(grep -c "#weather-$pat\"" < "/tmp/$view.html")
- all[$pat]=$((all[$pat] + nb[$pat]))
+ printf "%-22s |" "$view"
+ for nbfail in {0..5}; do
+ pat="${list_pat[$nbfail]}"
+ nb["$nbfail"]=$(grep -c "Build stability: $pat builds failed." < "/tmp/$view.html")
+ all["$nbfail"]=$((all["$nbfail"] + nb["$nbfail"]))
+ printf " %13s |" "${nb[$nbfail]}"
done
- printf "%-20s | %13s | %13s | %13s | %13s | %13s |\n" \
- "$view" "${nb[sunny]}" "${nb[partly-cloudy]}" "${nb[cloudy]}" "${nb[rainy]}" "${nb[pouring]}"
+ printf "\n"
done
-printf "========================================================================================================\n"
-printf "%-20s | %13s | %13s | %13s | %13s | %13s |\n" \
- "TOTAL" "${all[sunny]}" "${all[partly-cloudy]}" "${all[cloudy]}" "${all[rainy]}" "${all[pouring]}"
+printf "========================================================================================================================\n"
+printf "%-22s | %13s | %13s | %13s | %13s | %13s | %13s |\n" \
+ "TOTAL" "${all[0]}" "${all[1]}" "${all[2]}" "${all[3]}" "${all[4]}" "${all[5]}"