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 C6D3B431FD0 for ; Wed, 2 Nov 2011 10:20:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 5lT8-c4tD8rw for ; Wed, 2 Nov 2011 10:20:55 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0BC88431FB6 for ; Wed, 2 Nov 2011 10:20:54 -0700 (PDT) Received: by wwe6 with SMTP id 6so482205wwe.2 for ; Wed, 02 Nov 2011 10:20:53 -0700 (PDT) Received: by 10.227.198.141 with SMTP id eo13mr6784326wbb.19.1320254453690; Wed, 02 Nov 2011 10:20:53 -0700 (PDT) Received: from localhost ([109.131.187.47]) by mx.google.com with ESMTPS id fy13sm5274140wbb.18.2011.11.02.10.20.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Nov 2011 10:20:52 -0700 (PDT) From: Pieter Praet To: Jameson Graef Rollins , notmuch@notmuchmail.org Subject: Re: [PATCH 1/4] test: add 'GnuPG' prereq to dependent 'crypto' tests In-Reply-To: <87hb2n4k5c.fsf@servo.finestructure.net> References: <1320176954-4897-1-git-send-email-pieter@praet.org> <1320176954-4897-2-git-send-email-pieter@praet.org> <87hb2n4k5c.fsf@servo.finestructure.net> User-Agent: Notmuch/0.9+33~gadde72d (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Wed, 02 Nov 2011 18:20:09 +0100 Message-ID: <8739e6o306.fsf@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Wed, 02 Nov 2011 17:20:55 -0000 On Tue, 01 Nov 2011 14:17:51 -0700, Jameson Graef Rollins wrote: > On Tue, 1 Nov 2011 20:49:11 +0100, Pieter Praet wrote: > > -test_expect_success 'emacs delivery of signed message' \ > > +test_expect_success GPG 'emacs delivery of signed message' \ > > Hi, Pieter and Thomas. Thanks for all the work on this, but I have one > issue. Is there a way we can do this without adding a new argument to > every test function? For some reason I really don't like that solution. > It seems too invasive. Can't we have something that works more like > test_subtest_known_broken, that modifies the test environment, rather > than add an argument to every call of every testing function? > > jamie. I've been thinking the very same thing. We could use `test_have_prereq' to get rid of the argument, e.g.: #+begin_src sh test_have_prereq EMACS && \ test_begin_subtest "blah" echo "doing stuff..." test_expect_equal_file OUTPUT EXPECTED #+end_src ...but still, everything between `test_begin_subtest' and `test_expect_*' would be executed, so to err on the safe side, we could wrap the full body of every test, e.g.: #+begin_src sh test_begin_subtest "blah" test_have_prereq EMACS && { ... echo "doing stuff..." ... } test_expect_equal_file OUTPUT EXPECTED #+end_src Or... (I've given this zero thought, so please take it with a bag of salt) we could run all tests from inside a "controller" which `eval's their contents line by line, and skips a test entirely whenever $? > 0. All of this is (still) excessively invasive in some way or another though... Suggestions? Peace -- Pieter