Boost logo

Boost-Build :

Subject: [Boost-build] linking and running tests in parallel
From: Arvid Norberg (arvid.norberg_at_[hidden])
Date: 2019-03-29 08:57:31


I have a Jamfile defining a bunch of tests with run rules. When I run those
tests via b2, they are all run one at a time (essentially), regardless of
what I pass as -j argument. This makes my tests take a very long time to
run. (this is my Jamfile
https://github.com/arvidn/libtorrent/blob/RC_1_2/test/Jamfile#L163 )

Looking into this problem a bit, I suspect that it's really linking the
test binaries that's serialised, the tests just happen to take about as
long as it takes to link.

In the gcc toolset, there's mentioning of JAM_SEMAPHORE, in the link rules.
I don't fully understand how this affect the linking, but I suspect it
means only one target can be linked at a time.

https://github.com/boostorg/build/blob/develop/src/tools/gcc.jam#L1064

Is my assessment correct?
If so, is there a way to tell b2 that I really *do* want to link in
parallel?
If not, is there some other mechanism at play, that I can work around to
allow parallel linking?

thanks!

-- 
Arvid Norberg


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk