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.