* [Buildroot] [PATCH] utils/brmake: print the error code of the build
@ 2017-07-04 21:53 Yann E. MORIN
2017-07-04 22:15 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2017-07-04 21:53 UTC (permalink / raw)
To: buildroot
Since the stdout and stderr streams are redirected, it is not
immediately obvious when a build failed, even though brmake really exits
with the same error code as make did.
When there is an error, print the exit code after the elapsed time.
Reported-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
utils/brmake | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/utils/brmake b/utils/brmake
index 3c6f8485ab..e30119dd10 100755
--- a/utils/brmake
+++ b/utils/brmake
@@ -29,7 +29,12 @@ main() {
m=$((d/60))
d=$((d%60))
[ ${m} -eq 0 ] || { printf "%${mf}dmin " ${m}; sf="02"; }
- printf "%${sf}ds\n" ${d}
+ printf "%${sf}ds" ${d}
+
+ if [ ${ret} -ne 0 ]; then
+ printf " (error code: %s)" ${ret}
+ fi
+ printf "\n"
return ${ret}
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] utils/brmake: print the error code of the build
2017-07-04 21:53 [Buildroot] [PATCH] utils/brmake: print the error code of the build Yann E. MORIN
@ 2017-07-04 22:15 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2017-07-04 22:15 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 4 Jul 2017 23:53:15 +0200, Yann E. MORIN wrote:
> Since the stdout and stderr streams are redirected, it is not
> immediately obvious when a build failed, even though brmake really exits
> with the same error code as make did.
>
> When there is an error, print the exit code after the elapsed time.
>
> Reported-by: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> utils/brmake | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-04 22:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04 21:53 [Buildroot] [PATCH] utils/brmake: print the error code of the build Yann E. MORIN
2017-07-04 22:15 ` Thomas Petazzoni
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.