Page MenuHomePhabricator

[CMAKE] Allow to run boost unit tests in parallel
ClosedPublic

Authored by Fabien on Dec 11 2019, 16:52.

Details

Summary

This is inspired from the autotools equivalent, ported in D3535.
The idea is to run each test in it's own process by passing it to the
boost test filter. Then it relies on ninja to run them in parallel.

This implies the removal of ctest.

Test Plan
cmake -GNinja ..
ninja check-all

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cmake_parallel_tests
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8615
Build 15217: Default Diff Build & Tests
Build 15216: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Dec 13 2019, 02:52

That is not a good solution if you need to specify the parallelism level for the test. ninja already does job scheduling.

This revision now requires changes to proceed.Dec 13 2019, 02:52
Fabien planned changes to this revision.Dec 13 2019, 15:28
Fabien edited the summary of this revision. (Show Details)
Fabien edited the test plan for this revision. (Show Details)

Remove ctest to let ninja do the job scheduling.

Does this keep running the test suite once a test fails?

No, it stops on first failure (minus the already started jobs). It has the same behavior than autotools.

This revision is now accepted and ready to land.Dec 17 2019, 23:24

Reference the template from the module file rather than project to
avoid failure when building secp256k1 standalone.

Re-add mistakenly deleted newline.