From: Tomi Ollila Date: Sun, 24 Jan 2016 15:25:26 +0000 (+0200) Subject: Re: [PATCH v2 06/16] Prefer gpg2 in the test suite if available X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=086a15863469ff5835a50438270ec782655169ac;p=notmuch-archives.git Re: [PATCH v2 06/16] Prefer gpg2 in the test suite if available --- diff --git a/f7/cf75a00410c57b45c336f0984af6b306b366d9 b/f7/cf75a00410c57b45c336f0984af6b306b366d9 new file mode 100644 index 000000000..a967df449 --- /dev/null +++ b/f7/cf75a00410c57b45c336f0984af6b306b366d9 @@ -0,0 +1,108 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 029536DE0AC2 + for ; Sun, 24 Jan 2016 07:25:17 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.656 +X-Spam-Level: +X-Spam-Status: No, score=0.656 tagged_above=-999 required=5 tests=[AWL=0.004, + SPF_NEUTRAL=0.652] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id mR41UZaKUkFa for ; + Sun, 24 Jan 2016 07:25:14 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id E4F9F6DE0217 + for ; Sun, 24 Jan 2016 07:25:13 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 134471000B3; + Sun, 24 Jan 2016 17:25:26 +0200 (EET) +From: Tomi Ollila +To: Daniel Kahn Gillmor , + Notmuch Mail +Subject: Re: [PATCH v2 06/16] Prefer gpg2 in the test suite if available +In-Reply-To: <1453258369-7366-7-git-send-email-dkg@fifthhorseman.net> +References: <1453258369-7366-1-git-send-email-dkg@fifthhorseman.net> + <1453258369-7366-7-git-send-email-dkg@fifthhorseman.net> +User-Agent: Notmuch/0.21+32~g73439f8 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sun, 24 Jan 2016 15:25:17 -0000 + +On Wed, Jan 20 2016, Daniel Kahn Gillmor wrote: + +> Now that the notmuch client prefers gpg2 if available, having the test +> suite use the same preference makes it more likely to validate as +> expected. +> +> Be warned that the final test in T350-crypto.sh fails with an infinite +> loop in gpg if you're using an unpatched GnuPG 2.1.10, due to an +> upstream GnuPG bug: https://bugs.gnupg.org/gnupg/issue2187. In +> debian, this is resolved in 2.1.10-3 +> --- +> test/README | 2 +- +> test/T030-config.sh | 2 +- +> test/T040-setup.sh | 2 +- +> test/T350-crypto.sh | 16 ++++++++-------- +> test/test-lib.sh | 10 +++++++++- +> 5 files changed, 20 insertions(+), 12 deletions(-) +> +> --- a/test/test-lib.sh +> +++ b/test/test-lib.sh +> @@ -85,6 +85,13 @@ unset GREP_OPTIONS +> # For emacsclient +> unset ALTERNATE_EDITOR +> +> +# choose the preferred GnuPG binary: +> +if hash gpg2 2> /dev/null; then + +For consistency, instead of hash ... 2>/dev/null, use command -v >/dev/null + +Tomi + +> + GPG=gpg2 +> +else +> + GPG=gpg +> +fi +> + +> # Convenience +> # +> # A regexp to match 5 and 40 hexdigits +> @@ -1139,6 +1146,7 @@ test_emacs () { +> $load_emacs_tests \ +> --eval '(setq server-name \"$server_name\")' \ +> --eval '(server-start)' \ +> + --eval '(setq epg-gpg-program \"$GPG\")' \ +> --eval '(orphan-watchdog $$)'" || return +> EMACS_SERVER="$server_name" +> # wait until the emacs server is up +> @@ -1327,5 +1335,5 @@ test_declare_external_prereq dtach +> test_declare_external_prereq emacs +> test_declare_external_prereq ${TEST_EMACSCLIENT} +> test_declare_external_prereq gdb +> -test_declare_external_prereq gpg +> +test_declare_external_prereq gpg2 || test_declare_external_prereq gpg +> test_declare_external_prereq ${NOTMUCH_PYTHON} +> -- +> 2.7.0.rc3