Re: [PATCH v4 3/5] test: Guess a value for NOTMUCH_PYTHON

Subject: Re: [PATCH v4 3/5] test: Guess a value for NOTMUCH_PYTHON

Date: Tue, 11 Jul 2023 18:18:23 +0300

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Sun, Jul 09 2023, David Bremner wrote:

> python3 will work for many people, and reduce the friction to running
> the tests without running configure first.
> ---
>  test/test-lib-common.sh | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
> index 18fa29c0..4d14e0b3 100644
> --- a/test/test-lib-common.sh
> +++ b/test/test-lib-common.sh
> @@ -323,6 +323,10 @@ rm -rf "$TMP_DIRECTORY" || {
>  	exit 1
>  }
>  
> +# Provide a guess at a usable Python, to support running tests without
> +# running configure first.
> +NOTMUCH_PYTHON=${NOTMUCH_PYTHON-python3}

one thing to consider -- in all cases (the above is probably consistent),
whether to use format

   NOTMUCH_PYTHON=${NOTMUCH_PYTHON:-python3}

so that in case where the variable in question is defined, but empty,
to set the value to the given alternative (python3 in the case above)

it would be more robust in cases where empty value makes no sense.

(in any case this change LGTM.)

Tomi

> +
>  # A temporary home directory is needed by at least:
>  # - emacs/"Sending a message via (fake) SMTP"
>  # - emacs/"Reply within emacs"
> -- 
> 2.40.1
>
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: