Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id EB944431FBF for ; Wed, 15 Jan 2014 10:58:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ATKt1Erdp0T7 for ; Wed, 15 Jan 2014 10:58:34 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 59F0B431FAF for ; Wed, 15 Jan 2014 10:58:34 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id 6E1A51001E5; Wed, 15 Jan 2014 20:58:29 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH 1/1] test: check that expected results file exists when test script exits != 0 Date: Wed, 15 Jan 2014 20:58:27 +0200 Message-Id: <1389812307-17065-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.8.0 In-Reply-To: <877ga2jdf6.fsf@zancas.localnet> References: <877ga2jdf6.fsf@zancas.localnet> Cc: tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Wed, 15 Jan 2014 18:58:40 -0000 This way tests continue to run after one test script does not report success. --- I failed to notice this when MANUALLY testing the test change in question. This is quick fix and makes notmuch-test & test-lib.sh have interdependency how to modify the test script name for output file. I'll think whether there is something to be made about this, meanwhile I'm open to suggestions to that. too. test/notmuch-test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/notmuch-test b/test/notmuch-test index b843712..ecf81a9 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -32,12 +32,14 @@ fi trap 'e=$?; kill $!; exit $e' HUP INT TERM # Run the tests for test in $TESTS; do + this_test=${test%.sh} + this_test=${this_test#T[0-9][0-9][0-9]-} $TEST_TIMEOUT_CMD ./$test "$@" & wait $! # If the test failed without producing results, then it aborted, # so we should abort, too. RES=$? - if [[ $RES != 0 && ! -e "test-results/${test%.sh}" ]]; then + if [[ $RES != 0 && ! -e "test-results/$this_test" ]]; then exit $RES fi done -- 1.8.0