* Don't use GNU Parallel --version, use --minversion instead
@ 2021-05-02 18:57 Ole Tange
2021-08-02 11:21 ` [PATCH] test: use --minversion to detect GNU Parallel David Bremner
0 siblings, 1 reply; 4+ messages in thread
From: Ole Tange @ 2021-05-02 18:57 UTC (permalink / raw)
To: notmuch
Commit:
https://git.notmuchmail.org/git?p=notmuch;a=commitdiff;h=f2b5ad28e2b7b512d66946af34dd4149d1506bf4
Using GNU Parallel this way is not supported, and you have already
experienced why. But what _is_ supported for your use is using:
parallel --minversion 20201122
which prints the version number and returns true if the version is >=
20201122. It is specifically made for situations like this.
Replace 20201122 with the earliest version of GNU Parallel which has
all the features needed for running your tasks.
Also remember that you can use `parallel --embed`.
/Ole
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] test: use --minversion to detect GNU Parallel.
2021-05-02 18:57 Don't use GNU Parallel --version, use --minversion instead Ole Tange
@ 2021-08-02 11:21 ` David Bremner
2021-08-03 19:49 ` Tomi Ollila
2021-08-04 1:47 ` David Bremner
0 siblings, 2 replies; 4+ messages in thread
From: David Bremner @ 2021-08-02 11:21 UTC (permalink / raw)
To: Ole Tange, notmuch; +Cc: David Bremner
Based on a suggestion of Ole Tange [1].
[1]: id:CA+4vN7x6jp4HCiEybZ=5g+2X6Pa7etBFX3Bbd=UYty37gR6wEQ@mail.gmail.com
---
test/notmuch-test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/notmuch-test b/test/notmuch-test
index ce142f7c..eefdf091 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -51,7 +51,7 @@ RES=0
# Run the tests
if test -z "${NOTMUCH_TEST_SERIALIZE-}" && command -v parallel >/dev/null ; then
test -t 1 && export COLORS_WITHOUT_TTY=t || :
- if parallel --version 2>&1 | grep -q GNU ; then
+ if parallel --minversion 0 1>/dev/null 2>&1 ; then
echo "INFO: running tests with GNU parallel"
printf '%s\n' $TESTS | $TEST_TIMEOUT_CMD parallel || RES=$?
else
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] test: use --minversion to detect GNU Parallel.
2021-08-02 11:21 ` [PATCH] test: use --minversion to detect GNU Parallel David Bremner
@ 2021-08-03 19:49 ` Tomi Ollila
2021-08-04 1:47 ` David Bremner
1 sibling, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2021-08-03 19:49 UTC (permalink / raw)
To: David Bremner, Ole Tange, notmuch; +Cc: David Bremner
On Mon, Aug 02 2021, David Bremner wrote:
> Based on a suggestion of Ole Tange [1].
>
> [1]: id:CA+4vN7x6jp4HCiEybZ=5g+2X6Pa7etBFX3Bbd=UYty37gR6wEQ@mail.gmail.com
> ---
> test/notmuch-test | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/notmuch-test b/test/notmuch-test
> index ce142f7c..eefdf091 100755
> --- a/test/notmuch-test
> +++ b/test/notmuch-test
> @@ -51,7 +51,7 @@ RES=0
> # Run the tests
> if test -z "${NOTMUCH_TEST_SERIALIZE-}" && command -v parallel >/dev/null ; then
> test -t 1 && export COLORS_WITHOUT_TTY=t || :
> - if parallel --version 2>&1 | grep -q GNU ; then
> + if parallel --minversion 0 1>/dev/null 2>&1 ; then
fix the 2 spaces ;D
the 1 before >/dev/null is a bit confusing, fast reader reads parallel --minversion 0 1
as the arguments. so I'd suggest to drop the '1'.
Tomi
> echo "INFO: running tests with GNU parallel"
> printf '%s\n' $TESTS | $TEST_TIMEOUT_CMD parallel || RES=$?
> else
> --
> 2.30.2
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test: use --minversion to detect GNU Parallel.
2021-08-02 11:21 ` [PATCH] test: use --minversion to detect GNU Parallel David Bremner
2021-08-03 19:49 ` Tomi Ollila
@ 2021-08-04 1:47 ` David Bremner
1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2021-08-04 1:47 UTC (permalink / raw)
To: Ole Tange, notmuch
David Bremner <david@tethera.net> writes:
> Based on a suggestion of Ole Tange [1].
>
amended per Tomi's suggestions, and applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-04 1:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 18:57 Don't use GNU Parallel --version, use --minversion instead Ole Tange
2021-08-02 11:21 ` [PATCH] test: use --minversion to detect GNU Parallel David Bremner
2021-08-03 19:49 ` Tomi Ollila
2021-08-04 1:47 ` David Bremner
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).