From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 1F22E6DE0EF2 for ; Sat, 25 May 2019 10:36:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.155 X-Spam-Level: X-Spam-Status: No, score=-0.155 tagged_above=-999 required=5 tests=[AWL=0.046, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q7mRh0rQN_rd for ; Sat, 25 May 2019 10:36:11 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 12DEF6DE0EED for ; Sat, 25 May 2019 10:36:11 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1558805770; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding : from; bh=NSxlH/j9frifEaR0ysOfH08OzcMthrAZA5EgvjqyRHM=; b=nDJ0Jydn5VsxeAuXs2huuM3+7s0ToZO29c0ID8aJ0VdeWlHgMli3Vovi B0NJ0Gw3EB1EC/EkoNDNueC4JuBLAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1558805769; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding : from; bh=NSxlH/j9frifEaR0ysOfH08OzcMthrAZA5EgvjqyRHM=; b=4VmMKfVi074oEK2oBu0Vq8ULN0yKNDMFq5OMsXDfDvaGEtVSFYXOLUhD VNGZiGfPsFbld06sfhqxUv3jpZqg1w1hJBKcwL16wXnysniAbo4pRh6X/h CkRU7w/N28R58pv0J01UtjO4bTGWhXKbJr18hXkrOGAPVkKLKPFX3RPbK9 Omc7NG6lViac3xTvtcdyThVktbf+aRz7KJAXIz9KrYw6nMJfYrfZ39Rod+ ZcgRPbEIdqkPA/Olk6WVUpVuxkdNgUgc9a9ohhLfy7v7JiudMVPh1MTVpH AnAM6ClWZRLkeo2z6U1p3LC512ACzRwCkRiDiKOw6xVJMRSXh6eNZQ== Received: from fifthhorseman.net (cpe-74-71-53-242.nyc.res.rr.com [74.71.53.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id E2692F99D for ; Sat, 25 May 2019 13:36:07 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 7A0282024B; Sat, 25 May 2019 13:30:50 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH] test: report summary even when aborting Date: Sat, 25 May 2019 13:30:50 -0400 Message-Id: <20190525173050.8707-1-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 17:36:13 -0000 In certain cases of test suite failure, the summary report was not being printed. In particular, any failure on the parallel test suite, and any aborted test in the serialized test suite would end up hiding the summary. It's better to always show the summary where we can (while preserving the return code). Signed-off-by: Daniel Kahn Gillmor --- test/notmuch-test | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/notmuch-test b/test/notmuch-test index 50ed8721..d835e152 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -45,6 +45,8 @@ else fi trap 'e=$?; kill $!; exit $e' HUP INT TERM + +RES=0 # Run the tests if test -z "$NOTMUCH_TEST_SERIALIZE" && command -v parallel >/dev/null ; then test -t 1 && export COLORS_WITHOUT_TTY=t || : @@ -58,7 +60,6 @@ if test -z "$NOTMUCH_TEST_SERIALIZE" && command -v parallel >/dev/null ; then RES=$? if [[ $RES != 0 ]]; then echo "parallel test suite returned error code $RES" - exit $RES fi else for test in $TESTS; do @@ -69,7 +70,7 @@ else RES=$? testname=$(basename $test .sh) if [[ $RES != 0 && ! -e "$NOTMUCH_BUILDDIR/test/test-results/$testname" ]]; then - exit $RES + echo "Aborting on $testname (returned $RES)" fi done fi @@ -78,7 +79,11 @@ trap - HUP INT TERM # Report results echo $NOTMUCH_SRCDIR/test/aggregate-results.sh $NOTMUCH_BUILDDIR/test/test-results/* -ev=$? +if [ "$RES" = 0 ]; then + ev=$? +else + ev=$RES +fi # Clean up rm -rf $NOTMUCH_BUILDDIR/test/test-results -- 2.20.1