summaryrefslogtreecommitdiff
path: root/MAKEALL
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2009-09-21 12:04:32 -0500
committerWolfgang Denk <wd@denx.de>2009-09-24 00:37:41 +0200
commit40a28f0885e62b6607e12ed6baa6284927f5263e (patch)
treeb0a556a02cae04199caa60b6e18dd3c009d61e3d /MAKEALL
parent71ce9bd7f551e44c4ddb4c985c095da6d3452d79 (diff)
downloadu-boot-imx-40a28f0885e62b6607e12ed6baa6284927f5263e.zip
u-boot-imx-40a28f0885e62b6607e12ed6baa6284927f5263e.tar.gz
u-boot-imx-40a28f0885e62b6607e12ed6baa6284927f5263e.tar.bz2
MAKEALL: Add summary information
This change adds some basic summary information to the MAKEALL script. The summary information includes how many boards were compiled, how many boards had compile warnings or errors, and which specific boards had compile warnings or errors. This information is useful when doing compile testing to quickly determine which boards are broken. As a side benefit, no empty $BOARD.ERR files are generated by MAKEALL. Previously, each board had a corresponding $BOARD.ERR file, even if the board compiled cleanly. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Diffstat (limited to 'MAKEALL')
-rwxr-xr-xMAKEALL27
1 files changed, 27 insertions, 0 deletions
diff --git a/MAKEALL b/MAKEALL
index 1d50c34..4688d42 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -1,5 +1,9 @@
#!/bin/sh
+# Print statistics when we exit
+trap exit 1 2 3 15
+trap print_stats 0
+
# Determine number of CPU cores if no default was set
: ${BUILD_NCPUS:="`getconf _NPROCESSORS_ONLN`"}
@@ -31,6 +35,11 @@ fi
LIST=""
+# Keep track of the number of builds and errors
+ERR_CNT=0
+ERR_LIST=""
+TOTAL_CNT=0
+
#########################################################################
## MPC5xx Systems
#########################################################################
@@ -900,6 +909,14 @@ build_target() {
${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
| tee ${LOG_DIR}/$target.ERR
+ if [ -s ${LOG_DIR}/$target.ERR ] ; then
+ ERR_CNT=$((ERR_CNT + 1))
+ ERR_LIST="${ERR_LIST} $target"
+ else
+ rm ${LOG_DIR}/$target.ERR
+ fi
+
+ TOTAL_CNT=$((TOTAL_CNT + 1))
${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
| tee -a ${LOG_DIR}/$target.MAKELOG
@@ -907,7 +924,17 @@ build_target() {
#-----------------------------------------------------------------------
+print_stats() {
+ echo ""
+ echo "--------------------- SUMMARY ----------------------------"
+ echo "Boards compiled: ${TOTAL_CNT}"
+ if [ ${ERR_CNT} -gt 0 ] ; then
+ echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
+ fi
+ echo "----------------------------------------------------------"
+}
+#-----------------------------------------------------------------------
for arg in $@
do
case "$arg" in