HomePhabricator

Merge #12926: Run unit tests in parallel

Description

Merge #12926: Run unit tests in parallel

Summary:
PR12926 backport https://github.com/bitcoin/bitcoin/pull/12926/files
7ef9cd8 Increase entropy in test temp directory name (Pieter Wuille)
f6dfb0f Reorder travis builds (Pieter Wuille)
156db42 tests: run tests in parallel (Cory Fields)
66f3255 tests: split up actual tests and helper files (Cory Fields)

Pull request description:

This runs the unit tests (`src/test/test_bitcoin`) in 4 separate simultaneous processes, significantly speeding up some Travis runs (over 2x for win32).

This uses an approach by @theuni that relies on `make` as the mechanism for distributing tests over processes (through `-j`). For every test .cpp file, we search for `BOOST_FIXTURE_TEST_SUITE` or `BOOST_AUTO_TEST_SUITE`, and then invoke the test binary for just that suite (using `-t`). The (verbose) output is stored in a temporary file, and only shown in the case of failure.

Some makefile reshuffling is necessary to avoid trying to run tests from `src/test/test_bitcoin.cpp` for example, which contains framework/utility code but no real tests.

Finally, order the Travis jobs from slow to fast (apart from the arm/doc job which goes first, for fast failure). This should help reducing the total wall clock time before opening a PR and finishing Travis, in case where not all jobs are started simultaneously.

This is an alternative to #12831.

Test Plan: make check and pay attention to the output

Reviewers: deadalnix, Fabien, jasonbcox, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3535

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Apr 10 2018, 12:24
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Committed on Jul 3 2019, 18:18
markblundebergPushed on Jul 3 2019, 18:18
Reviewer
Restricted Project
Differential Revision
D3535: Merge #12926: Run unit tests in parallel
Parents
rABCb42dbe0b9b46: Merge #12293: [rpc] Mention that HD is enabled if hdmasterkeyid is present
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rABC2fa11c7cc7ec: Merge #12926: Run unit tests in parallel (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Jul 3 2019, 18:18