Skip to contentSkip to conversation

utils/brmake: print the error code of the build

PATCH New Yann E. MORIN 2 participants 2 messages Jul 4, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utils/brmake: print the error code of the build

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.

---
 utils/brmake | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
utils/brmake +6 -1
index 3c6f8485ab..e30119dd10 100755
@@ -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}
 }
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 utils/brmake: print the error code of the build

Hello,

Quoted 11 lines · Yann E. MORIN

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.

---
 utils/brmake | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com