aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGravatar Heiko Thiery <heiko.thiery@kontron.com>2019-10-10 12:24:26 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-10-10 22:54:12 +0200
commit5093435f664992449ffe2a02b701765499e85027 (patch)
tree19bf7207861f664192d856a4e8a16946eba5cb07 /utils
parent828555061025919a1686a594cb4377621bfac12a (diff)
downloadbuildroot-5093435f664992449ffe2a02b701765499e85027.tar.gz
buildroot-5093435f664992449ffe2a02b701765499e85027.tar.bz2
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 <heiko.thiery@kontron.com> [Thomas: improved commit log] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/test-pkg2
1 files changed, 2 insertions, 0 deletions
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() {