From patchwork Thu Oct 10 08:51:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1174377 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fTU/yK4G"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46plDy4G1Rz9sSX for ; Thu, 10 Oct 2019 19:51:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E4A102048E; Thu, 10 Oct 2019 08:51:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LWIdgp9FFeoA; Thu, 10 Oct 2019 08:51:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0B7AC203FD; Thu, 10 Oct 2019 08:51:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0C5B11BF2B8 for ; Thu, 10 Oct 2019 08:51:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 08B1C87916 for ; Thu, 10 Oct 2019 08:51:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VPBc4DD5gd4E for ; Thu, 10 Oct 2019 08:51:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 491B28790A for ; Thu, 10 Oct 2019 08:51:24 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id y19so6811606wrd.3 for ; Thu, 10 Oct 2019 01:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UPixq5Fyeu+yo2RnqW2Z1JXKzeRZLi1FZre6Mropc+A=; b=fTU/yK4GhNvrhbfRRwk63TSJESgkUNd9vKZRAjOgX8JjMAq9uLZyeI9BK9wjIxkCen sR9hFmpqIIRvX3cSAXzRN1KmdELM3Bzw0Vmb9WqHDCnQOlg0pll5ErR9ZKyW9+0VH8J/ jKE5Cz78RHAPjSfkVBgPfWC/A1rSlgoFC1owbuYM/4GI+nheCb2WqzGSXDPtTusN+Q51 zDV/fNnFJ62+9MRakJ25mGcNN4+2so+xKB98b2jF2CSr8xg9KrGUbciLpQIuY7hQ6mDS XKX4BO1G0vGhwF+H+dzMpO64WZY1IfP/yiDngCbTGZADM6u54rfB/oxdjmqwUd+SK8po 8DBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UPixq5Fyeu+yo2RnqW2Z1JXKzeRZLi1FZre6Mropc+A=; b=K0qv2BMNpsqdh6EV4F9tG2YTon9hJod4CEMo3MuSdKDk3vPRwqphVqtFhDhUbZnobI DqqJZmqpaL5ADE6SACQu37mgo5Nd+mtOeuPW514HHG1BWp83pd2lwa2sSz0g+Ssw52Dx ZogEt3Evy8mvF+btt660osOxgh1mFd92UtogL2BOFXbNY922jvoLt8EklzYBzpxnsQo+ CE1j8D/ohbFaYrPR+a3LgdGz+xuAl5IutYuGPRV4oVxZU7VGG5pYoj2pkBzja1FygU7b 9qwF2MY3GQ6bneIYoHkdWRvEE4vTKHDIwt0DzIcT++1fb9QSQa8TBwNNt0Sr3Lddi3Bd 9Y6w== X-Gm-Message-State: APjAAAUY25wAfHX+CSm/lE/m810fw9QA+Cb7jIbLvHDvxEzlcq9WSJtU nPuw11p7QW2lg4WMR17aP0gvec3q X-Google-Smtp-Source: APXvYqzzAgFUuS1iOCLWK/8RErmzEJQGMmgA5DhXHNPhZiMw48FKtpx7smW0NxP7OT8lcPtwOZkxAA== X-Received: by 2002:a5d:65c1:: with SMTP id e1mr6036093wrw.364.1570697482410; Thu, 10 Oct 2019 01:51:22 -0700 (PDT) Received: from hthiery01.sab.local ([213.135.10.150]) by smtp.gmail.com with ESMTPSA id 33sm12355956wra.41.2019.10.10.01.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 01:51:20 -0700 (PDT) From: heiko.thiery@gmail.com To: buildroot@buildroot.org Date: Thu, 10 Oct 2019 10:51:19 +0200 Message-Id: <20191010085120.32730-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] utils/test-pkg: set the return code for fail X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heiko.thiery@gmail.com, Heiko Thiery , thomas.petazzoni@bootlin.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Heiko Thiery 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 --- 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