unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: "Rollins\, Jameson" <jrollins@caltech.edu>,
	Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] tests: environment variable to specify that tests should be serialized
Date: Mon, 06 May 2019 22:15:49 +0300	[thread overview]
Message-ID: <m2zhnz75sq.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <20190506044406.6900-1-jrollins@caltech.edu>

On Mon, May 06 2019, Jameson Rollins wrote:

> From: Jameson Graef Rollins <jrollins@finestructure.net>
>
> If NOTMUCH_TEST_SERIALIZE is non-null all tests will be run in series,
> rather than in parallel.

While I like this parallelization option, and hope a version (could be even 
David's smtp_dummy change) of it could be available in notmuch repository
as soon as possible, I would not like it being default -- just like make -J
is not default...

... it being default, unsuspicious user running `make test` might have his
multitasking maching eating too much resources for a particular purpose and
slowing everything else. 

The simplest way to invoke parallelized tests could be make test-parallel
and/or make test p=1 ...or NOTMUCH_TEST_PARALLELIZE make test.

That's my opinion written out loud... vote me over if disagreed.. :D

Tomi

> ---
>  test/README       | 8 ++++++--
>  test/notmuch-test | 2 +-
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/test/README b/test/README
> index b378c3ff..3f54af58 100644
> --- a/test/README
> +++ b/test/README
> @@ -43,7 +43,6 @@ these system tools. Most often the tests are written, reviewed and
>  tested on Linux system so such portability issues arise from time to
>  time.
>  
> -
>  Running Tests
>  -------------
>  The easiest way to run tests is to say "make test", (or simply run the
> @@ -105,9 +104,14 @@ to with emacs, e.g.
>  
>       make test TEST_CC=gcc TEST_CFLAGS="-g -O2"
>  
> +Parallel Execution
> +------------------
> +If either the moreutils or GNU "parallel" utility is available all
> +tests will be run in parallel.  If the NOTMUCH_TEST_SERIALIZE variable
> +is non-null all tests will be executed sequentially.
> +
>  Quiet Execution
>  ---------------
> -
>  Normally, when new script starts and when test PASSes you get a message
>  printed on screen. This printing can be disabled by setting the
>  NOTMUCH_TEST_QUIET variable to a non-null value. Message on test
> diff --git a/test/notmuch-test b/test/notmuch-test
> index a4b7a1eb..bd3e080a 100755
> --- a/test/notmuch-test
> +++ b/test/notmuch-test
> @@ -40,7 +40,7 @@ fi
>  
>  trap 'e=$?; kill $!; exit $e' HUP INT TERM
>  # Run the tests
> -if command -v parallel >/dev/null ; then
> +if test -z "$NOTMUCH_TEST_SERIALIZE" && command -v parallel >/dev/null ; then
>      if parallel -h | grep -q GNU ; then
>          echo "INFO: running tests with GNU parallel"
>          printf '%s\n' $TESTS | $TEST_TIMEOUT_CMD parallel
> -- 
> 2.20.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

  parent reply	other threads:[~2019-05-06 19:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-04 20:57 parallelize test suite Rollins, Jameson
2019-05-04 20:57 ` [PATCH 1/3] tests: remove some redundant pre-cleanup of the corpus MAIL_DIR Rollins, Jameson
2019-05-04 20:57   ` [PATCH 2/3] tests: remove entangling corpus index optimization Rollins, Jameson
2019-05-04 20:57     ` [PATCH 3/3] tests: run all tests in parallel, if available Rollins, Jameson
2019-05-06  4:44       ` [PATCH] tests: environment variable to specify that tests should be serialized Rollins, Jameson
2019-05-06 10:32         ` [PATCH] test: add configurable port to smtp-dummy David Bremner
2019-05-06 19:39           ` Tomi Ollila
2019-05-06 20:55             ` Daniel Kahn Gillmor
2019-05-07 10:20             ` [PATCH] test: let the OS choose a port for smtp-dummy David Bremner
2019-05-07 12:38               ` Daniel Kahn Gillmor
2019-05-08 15:59                 ` Tomi Ollila
2019-05-10 10:16               ` David Bremner
2019-05-06 19:15         ` Tomi Ollila [this message]
2019-05-06 20:58           ` [PATCH] tests: environment variable to specify that tests should be serialized Daniel Kahn Gillmor
2019-05-05 10:22   ` [PATCH 1/3] tests: remove some redundant pre-cleanup of the corpus MAIL_DIR Tomi Ollila
2019-05-04 21:33 ` parallelize test suite Rollins, Jameson
2019-05-04 21:39 ` Daniel Kahn Gillmor
2019-05-04 22:53   ` David Bremner
2019-05-05 15:22     ` Daniel Kahn Gillmor
2019-05-05 16:44       ` Tomi Ollila
2019-05-06 21:39         ` Daniel Kahn Gillmor
2019-05-07 10:26 ` 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=m2zhnz75sq.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=jrollins@caltech.edu \
    --cc=notmuch@notmuchmail.org \
    /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).