1 Return-Path: <schnouki@schnouki.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id C75A8429E32
\r
6 for <notmuch@notmuchmail.org>; Mon, 3 Oct 2011 09:48:45 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5
\r
13 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id XPOJPsz7H2YZ for <notmuch@notmuchmail.org>;
\r
18 Mon, 3 Oct 2011 09:48:45 -0700 (PDT)
\r
19 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])
\r
20 by olra.theworths.org (Postfix) with ESMTP id 168E8429E27
\r
21 for <notmuch@notmuchmail.org>; Mon, 3 Oct 2011 09:48:45 -0700 (PDT)
\r
22 Received: from localhost.localdomain (thor.loria.fr [152.81.12.250])
\r
23 by ks3536.kimsufi.com (Postfix) with ESMTPSA id 440546A06A9;
\r
24 Mon, 3 Oct 2011 18:48:43 +0200 (CEST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;
\r
26 s=key-schnouki; t=1317660523;
\r
27 bh=zg5MTO9mYSZxa/whmkHMDVLtKHY5s71gqlCy0FvNV6Q=;
\r
28 h=From:To:Subject:Date:Message-Id:In-Reply-To:References:
\r
29 In-Reply-To:References;
\r
30 b=InJGYQA2vLXBPGSdKDRFWFw6SxkzQIOiZ7P45EseZROBd7JmIlHg+/r5zQ6O8zxn5
\r
31 goRujMGUY+eSFwFrCik/DUQiVzqvloX8iUJnbXftE4xjLjloiEN1tAJ8+IO9EqhT70
\r
32 dYMzZ1WuM7r5/WJeTf8DcT8hAhhm3sPwKxZi8Hv4=
\r
33 From: Thomas Jost <schnouki@schnouki.net>
\r
34 To: notmuch@notmuchmail.org
\r
35 Subject: [PATCH 01/13] test: define a helper function for defining prereqs on
\r
37 Date: Mon, 3 Oct 2011 18:47:15 +0200
\r
38 Message-Id: <1317660447-27520-2-git-send-email-schnouki@schnouki.net>
\r
39 X-Mailer: git-send-email 1.7.6.4
\r
40 In-Reply-To: <1317660447-27520-1-git-send-email-schnouki@schnouki.net>
\r
41 References: <1317660447-27520-1-git-send-email-schnouki@schnouki.net>
\r
42 In-Reply-To: <871uuuywtt.fsf@convex-new.cs.unb.ca>
\r
43 References: <871uuuywtt.fsf@convex-new.cs.unb.ca>
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Mon, 03 Oct 2011 16:48:46 -0000
\r
58 While test_expect_success could be used to define these prereqs, this is
\r
59 probably not a good idea: if a prereq is not available, using
\r
60 test_expect_success would result in a test being reported as FAILED at the end
\r
61 of the test suite (and its dependencies as skipped).
\r
63 On the contrary, when using test_set_bin_prereq, no test will be reported as
\r
66 test/test-lib.sh | 13 +++++++++++++
\r
67 1 files changed, 13 insertions(+), 0 deletions(-)
\r
69 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
70 index f8df6a5..8e16a7e 100755
\r
71 --- a/test/test-lib.sh
\r
72 +++ b/test/test-lib.sh
\r
73 @@ -542,6 +542,19 @@ test_have_prereq () {
\r
77 +test_set_bin_prereq () {
\r
81 + if which $bin &>/dev/null
\r
83 + test_set_prereq $prereq
\r
85 + say_color info "%-6s" "INFO"
\r
86 + echo " Missing test prerequisite: $name"
\r
90 # You are not expected to call test_ok_ and test_failure_ directly, use
\r
91 # the text_expect_* functions instead.
\r