Boost logo

Boost Testing :

Subject: Re: [Boost-testing] [boost][testing] difference between using 'toolset' as an option to and bjam_options
From: Niklas Angare (li51ckf02_at_[hidden])
Date: 2015-10-30 19:22:49

"Aparna Kumta" <aparna.kumta_at_[hidden]> wrote:
> While running regression tests, I see one can provide 'toolset' option as
> follows:
> python --toolset=sun ... "--bjam-options=-j8 toolset=sun stdlib=gnu
> cxxflags=\"-std=c++11\" linkflags=\"-std=c++11\" " ...
> I am assuming the first 'toolset' option is to build the testing tools,
> whereas the second 'toolset' passed on to --bjam-options is for running
> the regression tests themselves.

No, you specify the toolsets to use to build the tests with the --toolsets
option. If you want to use other toolsets to build the testing tools, you
specify them with the --bjam-toolset and --pjl-toolset options.

You should not specify a toolset with --bjam-options.

All this is described here:

> Now, if I add the following lines to sun.jam,
> 47 feature.extend stdlib : gnu_cxx11 ;
> 48 feature.compose <stdlib>gnu_cxx11
> 49 : <cxxflags>-std=c++11 <linkflags>-std=c++11
> <linkflags>-library=stdcpp,CrunG3
> 50 ;

If what you want to do is set up compiler flags for you regression tests, I
would suggest not touching sun.jam and instead putting something like this
in your ~/user-config.jam file:

using sun : version_gnu11 : : <cxxflags>"-std=c++11"
<linkflags>"-std=c++11 -library=stdcpp,CrunG3" ;
using sun : version_other : : <cxxflags>... ;

Where version should be the compiler version. I'm not sure what the
requirements are on that. The part after the underscore is whatever short
descriptive tag you want.

Then, you can run testing for both toolsets at the same time with this:
python --toolsets=sun-version_gnu11,sun-version_other ...

Or you can just run them one at a time, of course.

After writing all this, I just now looked at the results tables and your
testers already seem to be using most of this. I'm very confused. Did your
message get stuck in a black hole for a few months?


Niklas Angare

Boost-testing list run by mbergal at