unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>
Subject: Re: [PATCH 2/2] test: use gpgconf --create-socketdir if available
Date: Sun, 19 Feb 2017 12:24:43 +0200	[thread overview]
Message-ID: <m2fujatr4k.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <20170214214239.9330-3-david@tethera.net>

On Tue, Feb 14 2017, David Bremner <david@tethera.net> wrote:

> This enables the shortened socket pathes in /run or equivalent. The
> explicit call to gpgconf is needed for nonstandard GNUPGHOME settings.

2½ comments inline:

__> ---
>  test/test-lib.sh | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 86e792a8..9aa6163b 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -229,9 +229,18 @@ test_fixed=0
>  test_broken=0
>  test_success=0
>  
> +
> +_shutdown_gpg_agent () {
> +    if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then

 '==' is bashishm (well, maybe works in zsh too), standard
with [ ... ] and (builtin) test(1) is just single '=' for equality.

> +	gpgconf --kill gpg-agent
> +	gpgconf --remove-socketdir
> +    fi
> +}
> +
>  _exit_common () {
>  	code=$?
>  	trap - EXIT
> +	_shutdown_gpg_agent

better put `set +ex` _before_ `_shutdown_gpg_agent` so that possible failure
there may not stop exit processing

>  	set +ex
>  	rm -rf "$TEST_TMPDIR"
>  }
> @@ -1276,6 +1285,11 @@ test_init_ () {
>  
>  . ./test-lib-common.sh || exit 1
>  
> +# we need the setting of GNUPGHOME in test-lib-common.sh
> +if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then

== -> = 

> +    gpgconf --create-socketdir
> +fi
> +
>  emacs_generate_script
>  
>  
> -- 
> 2.11.0
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

  parent reply	other threads:[~2017-02-19 12:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 21:42 Proposed fix for test failures due to long socket paths David Bremner
2017-02-14 21:42 ` [PATCH 1/2] configure: add test for gpgconf --create-socketdir David Bremner
2017-02-14 22:02   ` David Bremner
2017-02-14 21:42 ` [PATCH 2/2] test: use gpgconf --create-socketdir if available David Bremner
2017-02-15 18:17   ` Daniel Kahn Gillmor
2017-02-15 18:59     ` David Bremner
2017-02-19 10:24   ` Tomi Ollila [this message]
2017-02-21 12:19 ` Proposed fix for test failures due to long socket paths David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2fujatr4k.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).