[U-Boot] "MAKEALL: Add summary information" breaks MAKEALL return code
Peter Tyser
ptyser at xes-inc.com
Sun Dec 6 01:08:26 CET 2009
Hi Wolfgang,
> your commit 40a28f0885 (MAKEALL: Add summary information) breaks
> MAKEALL because we now don't get any useful return code any more.
> You may argument that we didn't get one before, which is correct for
> building multiple boards in one call. But when running something like
> "MAKEALL <board>" we did get a return code, so wee could use this for
> example with "git bisect run".
I'm not seeing a useful return code before the change:
ptyser at petert u-boot $ git reset --hard 40a28f0885~1
HEAD is now at 71ce9bd galaxy5200: enable version environment variable
ptyser at petert u-boot $ echo "asdf" >> common/cmd_nvedit.c
ptyser at petert u-boot $ ./MAKEALL MVBLUE; echo $?
Configuring for MVBLUE board...
cmd_nvedit.c:643: error: expected '=', ',', ';', 'asm' or
'__attribute__' at end of input
make[1]: *** [cmd_nvedit.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [common/libcommon.a] Error 2
powerpc-linux-size: './u-boot': No such file
0
ptyser at petert u-boot $ git checkout master
M common/cmd_nvedit.c
Already on "master"
Your branch is behind 'origin/master' by 334 commits, and can be
fast-forwarded.
ptyser at petert u-boot $ echo "asdf" >> common/cmd_nvedit.c
ptyser at petert u-boot $ ./MAKEALL MVBLUE; echo $?
Configuring for MVBLUE board...
cmd_nvedit.c:644: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'asdf'
make[1]: *** [cmd_nvedit.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [common/libcommon.a] Error 2
powerpc-linux-size: './u-boot': No such file
0
Do you have an example of what breaks?
It seems like the behavior should be the same before/after the change.
In both cases the last command is "tee -a ${LOG_DIR}/$target.MAKELOG",
which always returns 0.
I agree that it would be nice to have a valid return code either way
though:)
Peter
> One possible fix could look like this:
>
> diff --git a/MAKEALL b/MAKEALL
> index d63c5c2..0cafed8 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -952,13 +952,16 @@ build_target() {
> #-----------------------------------------------------------------------
>
> print_stats() {
> + rc=0
> echo ""
> echo "--------------------- SUMMARY ----------------------------"
> echo "Boards compiled: ${TOTAL_CNT}"
> if [ ${ERR_CNT} -gt 0 ] ; then
> + rc=1
> echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
> fi
> echo "----------------------------------------------------------"
> + exit $rc
> }
>
> #-----------------------------------------------------------------------
>
>
> But I don't really like this approach, as it still changes behaviour:
> now even warnings get accounted as errors. What do you think?
>
> Best regards,
>
> Wolfgang Denk
>
More information about the U-Boot
mailing list