Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] utils/test-pkg: set the return code for fail
@ 2019-10-10  8:51 heiko.thiery at gmail.com
  2019-10-10  8:53 ` Heiko Thiery
  2019-10-10  8:58 ` yann.morin at orange.com
  0 siblings, 2 replies; 3+ messages in thread
From: heiko.thiery at gmail.com @ 2019-10-10  8:51 UTC (permalink / raw)
  To: buildroot

From: Heiko Thiery <heiko.thiery@kontron.com>

Add an option (-e) to exit the script with an error if a build
or the legal-info check fails.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
---
 utils/test-pkg | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/utils/test-pkg b/utils/test-pkg
index f3b34d5d0d..5e440b12f6 100755
--- a/utils/test-pkg
+++ b/utils/test-pkg
@@ -138,6 +138,10 @@ main() {
 
     printf "%d builds, %d skipped, %d build failed, %d legal-info failed\n" \
         ${nb} ${nb_skip} ${nb_fail} ${nb_legal}
+
+    if [ ${nb_fail} -ne 0 -o ${nb_legal} -ne 0 ]; then
+        return 1
+    fi
 }
 
 build_one() {
@@ -264,4 +268,7 @@ _EOF_
 }
 
 my_name="${0##*/}"
-main "${@}"
+main "${@}" && ret=0 || ret=${?}
+if [ ${ret} -ne 0 ]; then
+    exit 1
+fi
-- 
2.20.1

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

end of thread, other threads:[~2019-10-10  8:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-10  8:51 [Buildroot] [PATCH 1/1] utils/test-pkg: set the return code for fail heiko.thiery at gmail.com
2019-10-10  8:53 ` Heiko Thiery
2019-10-10  8:58 ` yann.morin at orange.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox