From: Heiko Thiery Date: Thu, 10 Oct 2019 10:24:26 +0000 (+0200) Subject: utils/test-pkg: ensure to exit with an error upon failure X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5093435f664992449ffe2a02b701765499e85027;p=buildroot.git utils/test-pkg: ensure to exit with an error upon failure This commit modifies the main() function so that it returns the sum of build and legal errors, making sure the overall test-pkg script exists with a non-zero error code upon failure. Signed-off-by: Heiko Thiery [Thomas: improved commit log] Signed-off-by: Thomas Petazzoni --- diff --git a/utils/test-pkg b/utils/test-pkg index f3b34d5d0d..a317d8c17a 100755 --- a/utils/test-pkg +++ b/utils/test-pkg @@ -138,6 +138,8 @@ main() { printf "%d builds, %d skipped, %d build failed, %d legal-info failed\n" \ ${nb} ${nb_skip} ${nb_fail} ${nb_legal} + + return $((nb_fail + nb_legal)) } build_one() {