All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information
@ 2009-09-21 17:04 Peter Tyser
  2009-09-21 17:04 ` [U-Boot] [PATCH 2/2 v5] MAKEALL: Use POSIX math Peter Tyser
  2009-09-23 22:38 ` [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Tyser @ 2009-09-21 17:04 UTC (permalink / raw)
  To: u-boot

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>
---
Changes since v1:
- Fix issue where summary was printed multiple times when a list
  was composed of sublists

Changes since v2:
- Update script to only use POSIX arithmetic

Changes since v3:
- Remove unnecessary expansion of variables inside of $(( ... ))

Changes since v4:
- Catch additional termination signals
- Use signal 0 to trigger printing of stats
- Break POSIX math change into a separate patch

 MAKEALL |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 1d50c34..fd06d8d 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
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2 v5] MAKEALL: Use POSIX math
  2009-09-21 17:04 [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information Peter Tyser
@ 2009-09-21 17:04 ` Peter Tyser
  2009-09-23 22:38   ` Wolfgang Denk
  2009-09-23 22:38 ` [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Tyser @ 2009-09-21 17:04 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
---
 MAKEALL |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index fd06d8d..1e7ec20 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -9,7 +9,7 @@ trap print_stats 0
 
 if [ "$BUILD_NCPUS" -gt 1 ]
 then
-	JOBS=-j`expr "$BUILD_NCPUS" + 1`
+	JOBS="-j $((BUILD_NCPUS + 1))"
 else
 	JOBS=""
 fi
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information
  2009-09-21 17:04 [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information Peter Tyser
  2009-09-21 17:04 ` [U-Boot] [PATCH 2/2 v5] MAKEALL: Use POSIX math Peter Tyser
@ 2009-09-23 22:38 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2009-09-23 22:38 UTC (permalink / raw)
  To: u-boot

Dear Peter Tyser,

In message <1253552673-22299-1-git-send-email-ptyser@xes-inc.com> you wrote:
> 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>
> ---
> Changes since v1:
> - Fix issue where summary was printed multiple times when a list
>   was composed of sublists
> 
> Changes since v2:
> - Update script to only use POSIX arithmetic
> 
> Changes since v3:
> - Remove unnecessary expansion of variables inside of $(( ... ))
> 
> Changes since v4:
> - Catch additional termination signals
> - Use signal 0 to trigger printing of stats
> - Break POSIX math change into a separate patch
> 
>  MAKEALL |   27 +++++++++++++++++++++++++++
>  1 files changed, 27 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Life would be so much easier if we could  just  look  at  the  source
code.                                                   -- Dave Olson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2 v5] MAKEALL: Use POSIX math
  2009-09-21 17:04 ` [U-Boot] [PATCH 2/2 v5] MAKEALL: Use POSIX math Peter Tyser
@ 2009-09-23 22:38   ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2009-09-23 22:38 UTC (permalink / raw)
  To: u-boot

Dear Peter Tyser,

In message <1253552673-22299-2-git-send-email-ptyser@xes-inc.com> you wrote:
> Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
> ---
>  MAKEALL |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
People have one thing in common: they are all different.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-23 22:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21 17:04 [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information Peter Tyser
2009-09-21 17:04 ` [U-Boot] [PATCH 2/2 v5] MAKEALL: Use POSIX math Peter Tyser
2009-09-23 22:38   ` Wolfgang Denk
2009-09-23 22:38 ` [U-Boot] [PATCH 1/2 v5] MAKEALL: Add summary information Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.