From: Tomi Ollila Date: Mon, 13 Jan 2014 19:25:56 +0000 (+0200) Subject: [PATCH 1/1] test: check that expected results file exists when test script exits... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=539aea0d666051a711da242a860f59410674f021;p=notmuch-archives.git [PATCH 1/1] test: check that expected results file exists when test script exits != 0 --- diff --git a/f4/f4c9350ee4e47a320d2325cff7175029192648 b/f4/f4c9350ee4e47a320d2325cff7175029192648 new file mode 100644 index 000000000..2ba695d7c --- /dev/null +++ b/f4/f4c9350ee4e47a320d2325cff7175029192648 @@ -0,0 +1,82 @@ +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 5618F431FAF + for ; Mon, 13 Jan 2014 11:26:11 -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 Qi9GWAxIJ9Md for ; + Mon, 13 Jan 2014 11:26:05 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id BAE87431FAE + for ; Mon, 13 Jan 2014 11:26:05 -0800 (PST) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 3DA5F1001E5; Mon, 13 Jan 2014 21:25:58 +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: Mon, 13 Jan 2014 21:25:56 +0200 +Message-Id: <1389641156-3365-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 1.8.0 +In-Reply-To: <1389280739-31930-1-git-send-email-tomi.ollila@iki.fi> +References: <1389280739-31930-1-git-send-email-tomi.ollila@iki.fi> +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: Mon, 13 Jan 2014 19:26:11 -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 +