Page MenuHomePhabricator

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

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

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC023d88136c94: [CMAKE] Allow to run boost unit tests in parallel
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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Dec 11 2019, 16:52
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 11 2019, 16:52
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)
Fabien edited the test plan for this revision. (Show Details)Dec 13 2019, 15:30
Fabien updated this revision to Diff 14836.Dec 13 2019, 15:39

Remove ctest to let ninja do the job scheduling.

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

Fabien added a comment.Dec 16 2019, 15:41

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

deadalnix accepted this revision.Dec 17 2019, 23:24
This revision is now accepted and ready to land.Dec 17 2019, 23:24
Fabien updated this revision to Diff 14952.Dec 18 2019, 07:28

Rebase

Fabien updated this revision to Diff 14958.Dec 18 2019, 08:46

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

Fabien updated this revision to Diff 14959.Dec 18 2019, 09:17

Re-add mistakenly deleted newline.

This revision was automatically updated to reflect the committed changes.