Boost logo

Boost Testing :

Subject: Re: [Boost-testing] [boost][testing] difference between using 'toolset' as an option to run.py and bjam_options
From: Aparna Kumta (aparna.kumta_at_[hidden])
Date: 2015-10-31 00:38:21


On 10/30/15 16:22, Niklas Angare wrote:
> "Aparna Kumta" <aparna.kumta_at_[hidden]> wrote:
>> While running regression tests, I see one can provide 'toolset'
>> option as follows:
>>
>> python run.py --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.
Then how would I use default values set for stdlib in sun.jam namely,
sun-stlport, apache and gnu?
sun.jam contains
42 feature.extend stdlib : gnu ;
43 feature.compose <stdlib>gnu
44 : <cxxflags>-std=c++03 <linkflags>-std=c++03

So specifying
"--bjam-options=-j8 toolset=sun stdlib=gnu cxxflags=\"-std=c++11\"
linkflags=\"-std=c++11\" "
just overwrites default value for cxxflags and linkfags as specified in
<stdlib> gnu.

>
> All this is described here:
> http://www.boost.org/development/running_regression_tests.html
>
>> 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 run.py --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.
Correct, as you notice, it works fine if for regression tests I update
my user-config.jam and not touch sun.jam.
However, I wanted to update sun.jam as users will not be aware of adding
this option(-library=stdcpp,CrunG3) to linkflags when they test the
released boost 1.60 version and wanted to test it out before submitting
a PR by using default sun.jam values.

> I'm very confused. Did your message get stuck in a black hole for a
> few months?
No, its a recent message.

Thanks,

Aparna

>
> Regards,
>
> Niklas Angare
>
>
>
> _______________________________________________
> Boost-Testing mailing list
> Boost-Testing_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-testing


Boost-testing list run by mbergal at meta-comm.com