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 331D0429E21 for ; Wed, 16 Nov 2011 12:17:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] 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 DCWJMFo5RyaQ for ; Wed, 16 Nov 2011 12:17:57 -0800 (PST) Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222]) by olra.theworths.org (Postfix) with ESMTP id 40F33431FD0 for ; Wed, 16 Nov 2011 12:17:57 -0800 (PST) Received: from odin.local (4va54-1-87-88-247-156.dsl.sta.abo.bbox.fr [87.88.247.156]) by ks3536.kimsufi.com (Postfix) with ESMTPSA id E4CE96A0026; Wed, 16 Nov 2011 21:17:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net; s=key-schnouki; t=1321474676; bh=MJ0WxhgBvokOeMHfg5h5P3W6fvH2SpzCXN4IcT1lqnc=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=SpCgzxu+j3XUmyIqiH6+xzUWdKWG0VmGgqyfl8IwdmR679EW8HqgCu4OvxLBikRip H1iKkK3TPbW4ZeP5rDc+xWBuUf9jtDAHmYdfkPnShRnPpPzo0LNHhLJTCqOeFTF4jf U75Sx2RS3xrlL0rwCKZT7ISl0xJdiuw/RDD97yXc= From: Thomas Jost To: Jameson Graef Rollins , notmuch@notmuchmail.org Subject: Re: [PATCH 0/6] Rebase of Pieter's "set test prereqs" In-Reply-To: <87lirf99vt.fsf@servo.finestructure.net> References: <1320176954-4897-1-git-send-email-pieter@praet.org> <1321454035-22023-1-git-send-email-schnouki@schnouki.net> <87lirf99vt.fsf@servo.finestructure.net> User-Agent: Notmuch/0.10_rc1+21~gaf76c55 (http://notmuchmail.org) Emacs/24.0.90.1 (x86_64-unknown-linux-gnu) Date: Wed, 16 Nov 2011 21:17:48 +0100 Message-ID: <87zkfv95zn.fsf@schnouki.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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, 16 Nov 2011 20:17:58 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 16 Nov 2011 10:53:42 -0800, Jameson Graef Rollins wrote: > On Wed, 16 Nov 2011 15:33:49 +0100, Thomas Jost w= rote: > > Hello list, > >=20 > > This is another rebased version of Pieter's series to add GPG and Emacs= as test > > prereqs, plus some additions on my own. (Rebased and posted as requeste= d by > > Pieter [1].) > >=20 > > Changes as compared to Pieter's patches (including parts from [2]): > > - prereqs are not tested using test_expect_success as they were in Piet= er's > > original patches, but using a new function called test_set_bin_prereq= . I wrote > > this before the gdb prereq was added, hence the different way to set = it. >=20 > Hey, Thomas. Thanks so much for this work. This sounds like a better > solution. >=20 > However, in the patches you send I see a lot of changes of the form >=20 > -test_expect_success 'emacs delivery of encrypted message with attachme= nt' \ > +test_expect_success GPG 'emacs delivery of encrypted message with atta= chment' \ >=20 > and >=20 > -test_expect_equal \ > +test_expect_equal GPG \ >=20 > which seems to contradict what you've said above. Not to mention that I > don't see anything that modifies calls to the test_expect_ functions. > Basically I see a lot more in the diffs than I would have expected in a > cursory look. Is this just a rebase flub, or is there something I'm > missing? >=20 > jamie. Hi Jamie, I guess I wasn't clear in my explanations :) Pieter's patches use this to detect the presence of GPG/Emacs and set the prereq: +# GnuPG is a prereq. +test_expect_success "prereq: GnuPG is present" "which gpg" \ + && test_set_prereq GPG There are 2 problems with this approach:=20 =2D test_expect_success returns 0 regardless of the actual result of the command it runs. So even if gpg is not installed,=20 text_expect_success "..." "which gpg" will succeed, and "test_set_prereq GPG" will be run. This, however, has been fixed in commit 003e7180 -- which had not been pushed when I wrote this in the first place :) =2D using test_expect_* to set a prereq does not make sense. If emacs is absent, the test suite would report a failed test. But a missing prereq is *not* a notmuch issue, so this should *not* be reported as a failed test. Hence my first patch, which defines test_set_bin_prereq, a new helper function to set a prereq without using any test_expect_*. After that we can use the normal prereq syntax from the test suite: =2D test_expect_success COMMAND --> run COMMAND, expecting it to succeed =2D test_expect_success PREREQ COMMAND --> skip if PREREQ is not set, else run the test as before (and same thing with the other test_expect_* functions) Does it make more sense now? Regards, =2D-=20 Thomas/Schnouki --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJOxBptAAoJEMPdciX+bh5IabgH/3voa/YJjklax+LokiZr2B/J BcqVAsT5D1pcNPdO+P4LFppIepjxmR6GnLJbX3kzmjb8/p9eV39qGzrGlK2VDs8v h6aLZ9jx5UkSMHRBEZxwRD2yeJkiv3KsCj37pvhtH39gEoinEpCZqtimSCZMahNm /rM+IB8Y4ZNOuz1S/l3v47XSOltoHUgy8WGwjQKiihcb0aJmw30QREdNiYMqaT0v PM8MiVmRHeuv56pbSFqh1IHCNemb0XzU/TeZD1rW2Y0wzMQcbKyiTpw5sHtxhZuD NgpW/vsjaOLGIiWL+1Z8NIbIXfanOaYST5MQZ6uqfKWbpqrB2nZ4w/D3Qxr7B10= =hEq/ -----END PGP SIGNATURE----- --=-=-=--