1 Return-Path: <pieter@praet.org>
\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 65C78429E32
\r
6 for <notmuch@notmuchmail.org>; Tue, 1 Nov 2011 12:50:23 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id XF8DWXVIJ1ae for <notmuch@notmuchmail.org>;
\r
16 Tue, 1 Nov 2011 12:50:21 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
18 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 751B8429E2F
\r
21 for <notmuch@notmuchmail.org>; Tue, 1 Nov 2011 12:50:20 -0700 (PDT)
\r
22 Received: by mail-wy0-f181.google.com with SMTP id 8so2012948wyg.26
\r
23 for <notmuch@notmuchmail.org>; Tue, 01 Nov 2011 12:50:20 -0700 (PDT)
\r
24 Received: by 10.227.59.213 with SMTP id m21mr1214177wbh.19.1320177019985;
\r
25 Tue, 01 Nov 2011 12:50:19 -0700 (PDT)
\r
26 Received: from localhost ([109.131.187.47])
\r
27 by mx.google.com with ESMTPS id fr4sm94158wbb.0.2011.11.01.12.50.19
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Tue, 01 Nov 2011 12:50:19 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: notmuch@notmuchmail.org
\r
32 Subject: [PATCH 2/4] test: add 'Emacs' prereq to dependent 'crypto' tests
\r
33 Date: Tue, 1 Nov 2011 20:49:12 +0100
\r
34 Message-Id: <1320176954-4897-3-git-send-email-pieter@praet.org>
\r
35 X-Mailer: git-send-email 1.7.7.1
\r
36 In-Reply-To: <1320176954-4897-1-git-send-email-pieter@praet.org>
\r
37 References: <1320176954-4897-1-git-send-email-pieter@praet.org>
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Tue, 01 Nov 2011 19:50:24 -0000
\r
52 Adds a new test that checks for the presence of 'emacs',
\r
53 and adds that test as a prereq to all subsequent tests
\r
56 This causes tests with unmet dependencies to be skipped.
\r
59 test/crypto | 17 ++++++++++++++---
\r
60 1 files changed, 14 insertions(+), 3 deletions(-)
\r
62 diff --git a/test/crypto b/test/crypto
\r
63 index 3795926..4a00c00 100755
\r
67 test_description='PGP/MIME signature verification and decryption'
\r
70 +# Emacs is a prereq.
\r
71 +test_expect_success "prereq: Emacs is present" "which emacs" \
\r
72 + && test_set_prereq EMACS
\r
74 # GnuPG is a prereq.
\r
75 test_expect_success "prereq: GnuPG is present" "which gpg" \
\r
76 && test_set_prereq GPG
\r
78 +# Some tests have multiple prereqs, but the test_expect_* functions
\r
79 +# accept only a single argument as prereq tag, and using test_have_prereq
\r
80 +# in and around tests causes various errors for me, so a dirty workaround
\r
81 +# will have to do for the time being.
\r
82 +test_have_prereq EMACS && test_have_prereq GPG \
\r
83 + && test_set_prereq EMACS+GPG
\r
88 @@ -36,7 +47,7 @@ FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep
\r
89 # although I can't figure out why
\r
92 -test_expect_success GPG 'emacs delivery of signed message' \
\r
93 +test_expect_success EMACS+GPG 'emacs delivery of signed message' \
\r
94 'emacs_deliver_message \
\r
95 "test signed message 001" \
\r
96 "This is a test signed message." \
\r
97 @@ -146,7 +157,7 @@ mv "${GNUPGHOME}"{.bak,}
\r
98 cat <<EOF >TESTATTACHMENT
\r
99 This is a test file.
\r
101 -test_expect_success GPG 'emacs delivery of encrypted message with attachment' \
\r
102 +test_expect_success EMACS+GPG 'emacs delivery of encrypted message with attachment' \
\r
103 'emacs_deliver_message \
\r
104 "test encrypted message 001" \
\r
105 "This is a test encrypted message.\n" \
\r
106 @@ -268,7 +279,7 @@ test_expect_equal GPG \
\r
108 mv "${GNUPGHOME}"{.bak,}
\r
110 -test_expect_success GPG 'emacs delivery of encrypted + signed message' \
\r
111 +test_expect_success EMACS+GPG 'emacs delivery of encrypted + signed message' \
\r
112 'emacs_deliver_message \
\r
113 "test encrypted message 002" \
\r
114 "This is another test encrypted message.\n" \
\r