From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 034C9429E25 for ; Mon, 12 Sep 2011 19:42:59 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 0L0GI9rolqrU for ; Mon, 12 Sep 2011 19:42:57 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 04A17431FB6 for ; Mon, 12 Sep 2011 19:42:56 -0700 (PDT) Received: from zancas.localnet (fctnnbsc36w-156034073093.pppoe-dynamic.High-Speed.nb.bellaliant.net [156.34.73.93]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p8D2g69W028277 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Mon, 12 Sep 2011 23:42:09 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1R3Iwn-0006Bk-TK; Mon, 12 Sep 2011 23:42:05 -0300 From: david@tethera.net To: notmuch@notmuchmail.org Subject: [PATCH] test: reset test_subtest_known_broken_ after each success/failure. Date: Mon, 12 Sep 2011 23:41:54 -0300 Message-Id: <1315881714-23759-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <87obyqvc4s.fsf@gmail.com> References: <87obyqvc4s.fsf@gmail.com> Cc: David Bremner 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: Tue, 13 Sep 2011 02:42:59 -0000 From: David Bremner This means that test_subtest_known_broken needs to be called before every known broken subtest, which is no different than what is documented for the test_begin_subtest case. The assumption is that every test ends up calling either skipping, calling test_ok_ or test_failure_ and and the latter in turn delegate to the known_broken versions in the case where test_subtest_known_broken_ is set. --- test/test-lib.sh | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 196ef49..966b2dc 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -574,12 +574,14 @@ test_failure_message_ () { } test_known_broken_ok_ () { + test_subtest_known_broken_= test_fixed=$(($test_fixed+1)) say_color pass "%-6s" "FIXED" echo " $@" } test_known_broken_failure_ () { + test_subtest_known_broken_= test_broken=$(($test_broken+1)) test_failure_message_ "BROKEN" "$@" } @@ -614,6 +616,7 @@ test_skip () { fi case "$to_skip" in t) + test_subtest_known_broken_= say_color skip >&3 "skipping test: $@" say_color skip "%-6s" "SKIP" echo " $1" -- 1.7.5.4