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 C6D3B431FD0
\r
6 for <notmuch@notmuchmail.org>; Wed, 2 Nov 2011 10:20:55 -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 5lT8-c4tD8rw for <notmuch@notmuchmail.org>;
\r
16 Wed, 2 Nov 2011 10:20:55 -0700 (PDT)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 0BC88431FB6 for <notmuch@notmuchmail.org>; Wed, 2 Nov 2011 10:20:54 -0700
\r
22 Received: by wwe6 with SMTP id 6so482205wwe.2
\r
23 for <notmuch@notmuchmail.org>; Wed, 02 Nov 2011 10:20:53 -0700 (PDT)
\r
24 Received: by 10.227.198.141 with SMTP id eo13mr6784326wbb.19.1320254453690;
\r
25 Wed, 02 Nov 2011 10:20:53 -0700 (PDT)
\r
26 Received: from localhost ([109.131.187.47])
\r
27 by mx.google.com with ESMTPS id fy13sm5274140wbb.18.2011.11.02.10.20.51
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Wed, 02 Nov 2011 10:20:52 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Jameson Graef Rollins <jrollins@finestructure.net>,
\r
32 notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH 1/4] test: add 'GnuPG' prereq to dependent 'crypto' tests
\r
34 In-Reply-To: <87hb2n4k5c.fsf@servo.finestructure.net>
\r
35 References: <1320176954-4897-1-git-send-email-pieter@praet.org>
\r
36 <1320176954-4897-2-git-send-email-pieter@praet.org>
\r
37 <87hb2n4k5c.fsf@servo.finestructure.net>
\r
38 User-Agent: Notmuch/0.9+33~gadde72d (http://notmuchmail.org) Emacs/23.3.1
\r
39 (x86_64-unknown-linux-gnu)
\r
40 Date: Wed, 02 Nov 2011 18:20:09 +0100
\r
41 Message-ID: <8739e6o306.fsf@praet.org>
\r
43 Content-Type: text/plain; charset=us-ascii
\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: Wed, 02 Nov 2011 17:20:55 -0000
\r
58 On Tue, 01 Nov 2011 14:17:51 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
\r
59 > On Tue, 1 Nov 2011 20:49:11 +0100, Pieter Praet <pieter@praet.org> wrote:
\r
60 > > -test_expect_success 'emacs delivery of signed message' \
\r
61 > > +test_expect_success GPG 'emacs delivery of signed message' \
\r
63 > Hi, Pieter and Thomas. Thanks for all the work on this, but I have one
\r
64 > issue. Is there a way we can do this without adding a new argument to
\r
65 > every test function? For some reason I really don't like that solution.
\r
66 > It seems too invasive. Can't we have something that works more like
\r
67 > test_subtest_known_broken, that modifies the test environment, rather
\r
68 > than add an argument to every call of every testing function?
\r
72 I've been thinking the very same thing.
\r
75 We could use `test_have_prereq' to get rid of the argument, e.g.:
\r
78 test_have_prereq EMACS && \
\r
79 test_begin_subtest "blah"
\r
80 echo "doing stuff..."
\r
81 test_expect_equal_file OUTPUT EXPECTED
\r
84 ...but still, everything between `test_begin_subtest' and `test_expect_*'
\r
85 would be executed, so to err on the safe side, we could wrap the full body
\r
86 of every test, e.g.:
\r
89 test_begin_subtest "blah"
\r
90 test_have_prereq EMACS && {
\r
92 echo "doing stuff..."
\r
95 test_expect_equal_file OUTPUT EXPECTED
\r
99 Or... (I've given this zero thought, so please take it with a bag of
\r
100 salt) we could run all tests from inside a "controller" which `eval's
\r
101 their contents line by line, and skips a test entirely whenever $? > 0.
\r
104 All of this is (still) excessively invasive in some way or another though...
\r