From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E45BA6DE129E for ; Mon, 6 May 2019 12:15:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.439 X-Spam-Level: X-Spam-Status: No, score=0.439 tagged_above=-999 required=5 tests=[AWL=-0.213, 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 SPMDwA_KM4QO for ; Mon, 6 May 2019 12:15:56 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 41F5F6DE11AF for ; Mon, 6 May 2019 12:15:54 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 185B01000E3; Mon, 6 May 2019 22:15:50 +0300 (EEST) From: Tomi Ollila To: "Rollins\, Jameson" , Notmuch Mail Subject: Re: [PATCH] tests: environment variable to specify that tests should be serialized In-Reply-To: <20190506044406.6900-1-jrollins@caltech.edu> References: <20190504205738.21504-4-jrollins@caltech.edu> <20190506044406.6900-1-jrollins@caltech.edu> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/25.2.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.29 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: Mon, 06 May 2019 19:15:58 -0000 On Mon, May 06 2019, Jameson Rollins wrote: > From: Jameson Graef Rollins > > 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