gpgscm: Limit the number of parallel jobs.
authorJustus Winter <justus@g10code.com>
Mon, 19 Jun 2017 14:31:25 +0000 (16:31 +0200)
committerJustus Winter <justus@g10code.com>
Mon, 19 Jun 2017 14:51:32 +0000 (16:51 +0200)
commit61ef43546ba9f0209692a1569d2f033436566a02
treefad867ae52176e211985e9585e7837dc7598142c
parente555e7ed7de20fbbb1e3b005c32e292f29cc4a58
gpgscm: Limit the number of parallel jobs.

* ffi.c (do_wait_processes): Suppress the timeout error.
* tests.scm (semaphore): New definition.
(test-pool): Only run a bounded number of tests in parallel.
(test::started?): New function.
(run-tests-parallel): Do not report results, do not start the tests.
(run-tests-sequential): Adapt.
(run-tests): Parse the number of parallel jobs.
--

This change limits the number of tests that are run in parallel.  This
way we do not overwhelm the operating systems' scheduler.  As a
side-effect, we also get more accurate runtime information, and it
will be easy to implement timeouts on top of this.

Use TESTFLAGS to limit the number of jobs:

    $ make check-all TESTFLAGS=--parallel=16

Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/ffi.c
tests/gpgscm/tests.scm