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 DE5EF429E32 for ; Thu, 12 May 2011 06:15:18 -0700 (PDT) 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 Ucka8c8MwZA0 for ; Thu, 12 May 2011 06:15:14 -0700 (PDT) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id 52058429E2F for ; Thu, 12 May 2011 06:15:14 -0700 (PDT) X-AuditID: 1209190c-b7c65ae00000117c-af-4dcbdd6933ff Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id AB.A0.04476.96DDBCD4; Thu, 12 May 2011 09:15:21 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id p4CDFD1o007684; Thu, 12 May 2011 09:15:13 -0400 Received: from drake.mit.edu (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [209.6.116.242]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p4CDFCOm005317 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Thu, 12 May 2011 09:15:13 -0400 (EDT) Received: from amthrax by drake.mit.edu with local (Exim 4.76) (envelope-from ) id 1QKVjU-0004ZX-EF; Thu, 12 May 2011 09:15:12 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH] test: Report test failures from test_expect_* Date: Thu, 12 May 2011 09:15:10 -0400 Message-Id: <1305206110-17511-1-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.5.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRmVeSWpSXmKPExsUixCmqrJt597Svweb7uhbXb85kdmD0eLbq FnMAYxSXTUpqTmZZapG+XQJXxpSDrxgL+tgq7r/fzNTA+Iyli5GTQ0LARGLj9f2sELaYxIV7 69m6GLk4hAT2MUpsfHaVFcLZwCjxZ/4vJgjnPpNES/MRFghnPqPEpTt/2ED62QQ0JLbtX84I YosISEvsvDsbqJ2Dg1lAROLdTCaQsLCAnURrzzF2EJtFQFXi/NMfYHFeAQeJ2VfeQJ2hIHHl yjyWCYy8CxgZVjHKpuRW6eYmZuYUpybrFicn5uWlFuka6uVmluilppRuYgSHgSTPDsY3B5UO MQpwMCrx8N5ae8pXiDWxrLgy9xCjJAeTkiiv763TvkJ8SfkplRmJxRnxRaU5qcWHGCU4mJVE eKWWAJXzpiRWVqUW5cOkpDlYlMR5Z0iq+woJpCeWpGanphakFsFkZTg4lCR4/9wBGipYlJqe WpGWmVOCkGbi4AQZzgM0/B5IDW9xQWJucWY6RP4Uoy7H50eHDjAKseTl56VKifNeACkSACnK KM2DmwOL31eM4kBvCfPeB6niAcY+3KRXQEuYgJaYbzgBsqQkESEl1cA43055jV/Gn4LZ/9+U 3FkhKyRkeFh9ofiPrFIR9/pHwe9tPHvPVoswleYccfUNdnk2Z4vHpx2/grKfinB7W7Q0P8lb LtN9wufM2ez+41w/Enz/79TV3RBkra579GDgqx/5li83K9jVr19Yuv3ND638pubNambbRJJ0 L/9e+DFBxKq8nlnP6rQSS3FGoqEWc1FxIgDsj3LPugIAAA== Cc: amdragon@mit.edu 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: Thu, 12 May 2011 13:15:19 -0000 This makes test_expect_* return non-zero if the test fails, so the caller can make decisions based on this, such as setting test prerequisites. --- test/test-lib.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 9b56406..955350a 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -575,6 +575,7 @@ test_failure_ () { echo "$@" | sed -e 's/^/ /' if test "$verbose" != "t"; then cat test.output; fi test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; } + return 1 } test_known_broken_ok_ () { @@ -587,6 +588,7 @@ test_known_broken_failure_ () { test_broken=$(($test_broken+1)) say_color pass "%-6s" "BROKEN" echo " $@" + return 1 } test_debug () { -- 1.7.5.1