From patchwork Sat Jul 20 18:23:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1134423 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="V5/8Na2t"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45rbrZ4N6Yz9s4Y for ; Sun, 21 Jul 2019 04:25:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4580CC21BE5; Sat, 20 Jul 2019 18:24:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 17551C21C50; Sat, 20 Jul 2019 18:24:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 96135C21CB6; Sat, 20 Jul 2019 18:24:46 +0000 (UTC) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) by lists.denx.de (Postfix) with ESMTPS id 3D69DC21DD7 for ; Sat, 20 Jul 2019 18:24:45 +0000 (UTC) Received: by mail-io1-f44.google.com with SMTP id e20so34889468iob.9 for ; Sat, 20 Jul 2019 11:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qD48VMCDUq0QEpPPrLU0Eh/0H5pS0n952OgUobf+Nvs=; b=V5/8Na2tI4RC12LoqABLC9+mwYMd2rZebDn+vWpZYgtnkZLrkkVIX+jlkhbk/sP/23 3m9FxHZXSpAZVltaLzPuFCIJgj6hoEgPEhMQmC3rgl1GnHAbDI8IxMS+rI7W6xaLlRvz LEjArZchREGByzFJFHzef96FuXlbIPE0HNr8I= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=qD48VMCDUq0QEpPPrLU0Eh/0H5pS0n952OgUobf+Nvs=; b=Pn/TL1tew32w+Tpb0nqyycpBI2+UYe7Lae5JhO8hUYmXRFrQ3rn8m52PCgORu2HWCd qLI4ASXlrQSX+j+hafbMRzWr9aA+p1r6h6CTFvJ8gkrlfqJ+ZshPkT96L/mmMjUpqHCj 5q+sJoRbmVqn0n7LdOwfQdRw7CDaYNfGcUoJBocMCXg3ZJYpdyNSieehka7ixi5eOcG3 Isekgwi8DD0/vE+UdIeYuPNLMMgKOyz5RtiUrIv6CM2Sd6GKmlRe4f5h+LV9h78tABX+ pMGE005/6o9H/IjlJLzuoyoGlM5FAe5pWXTYizmPHsfu5woaj3XsyA9vkRG27uKPBnAn /Gog== X-Gm-Message-State: APjAAAXFDJSXP2YfbZHm65+E8KFON/q/2eQX8LTuB5MAqiZJ9U+kEy6z WanSB5P4fmS6oIgyaHbg49B/4BrIkz4= X-Google-Smtp-Source: APXvYqwXgMnBaHoaZwjoTt0hm5iTPby7HmYKJEYCjjhB2fGJ9nAjWJE8k+zMFXhibgkMp4SnnCW0IQ== X-Received: by 2002:a5d:964d:: with SMTP id d13mr11386051ios.224.1563647083935; Sat, 20 Jul 2019 11:24:43 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id z17sm49778933iol.73.2019.07.20.11.24.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 11:24:43 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 20 Jul 2019 12:23:23 -0600 Message-Id: <20190720182416.183626-2-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.657.g960e92d24f-goog In-Reply-To: <20190720182416.183626-1-sjg@chromium.org> References: <20190720182416.183626-1-sjg@chromium.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 01/53] dtoc: Return a non-zero exit code when tests fail X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" At present 'dtoc -t' return a success code even if some of the tests fail. Fix this by checking the test result and setting the exit code. This allows 'make qcheck' to function as expected. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/dtoc/dtoc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py index c1a1d3534d4..514e0dd4a34 100755 --- a/tools/dtoc/dtoc.py +++ b/tools/dtoc/dtoc.py @@ -71,6 +71,10 @@ def run_tests(args): print(err) for _, err in result.failures: print(err) + if result.errors or result.failures: + print('dtoc tests FAILED') + return 1 + return 0 def RunTestCoverage(): """Run the tests and check that we get 100% coverage""" @@ -101,7 +105,8 @@ parser.add_option('-T', '--test-coverage', action='store_true', # Run our meagre tests if options.test: - run_tests(args) + ret_code = run_tests(args) + sys.exit(ret_code) elif options.test_coverage: RunTestCoverage()