[boost][testing] difference between using 'toolset' as an option to run.py and bjam_options

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[boost][testing] difference between using 'toolset' as an option to run.py and bjam_options

Aparna Kumta
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.

When compiling with -std=c++11,
my  tools/build/src/tools/sun.jam file contains,

       42 feature.extend stdlib : gnu ;
      43 feature.compose <stdlib>gnu
      44     : <cxxflags>-std=c++03 <linkflags>-std=c++03
      45     ;
      46

so the above  'python run.py ...' command works well.

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     ;

and run the regression tests as follows:
python run.py --toolset=sun ... "--bjam-options=-j8 toolset=sun'
stdlib=gnu_cxx11 ...

My test run fails as follows:
notice: [python-cfg]   library path: "/usr/lib/python2.7/config" "/usr/lib"
/export/users/akumta/b160_dev/boost_bb/src/build/feature.jam:494: in
feature.validate-value-string from
  module feature
error: "gnu_cxx11" is not a known value of feature <stdlib>
error: legal values: "native" "sun-stlport" "apache" "gnu" "stlport"
/export/users/akumta/b160_dev/boost_bb/src/build/property.jam:276: in
validate1 from module property
/export/users/akumta/b160_dev/boost_bb/src/build/property.jam:302: in
property.validate from module property
/export/users/akumta/b160_dev/boost_bb/src/build/build-request.jam:228:
in convert-command-line-element  from module build-request
/export/users/akumta/b160_dev/boost_bb/src/build/build-request.jam:179:
in build-request.convert-command-line-elements from module build-request
/export/users/akumta/b160_dev/boost_bb/src/build-system.jam:687: in load
from module build-system
/export/users/akumta/b160_dev/boost_bb/src/kernel/modules.jam:295: in
import from module modules
/export/users/akumta/b160_dev/boost_bb/src/kernel/bootstrap.jam:139: in
boost-build from module
/export/users/akumta/b160_dev/boost_root/boost-build.jam:17: in module
scope from module


Is there something else I need to do at my end to get this to work if I
modify sun.jam as above?


Thanks,

Aparna

_______________________________________________
Boost-Testing mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-testing
Reply | Threaded
Open this post in threaded view
|

Re: [boost][testing] difference between using 'toolset' as an option to run.py and bjam_options

Niklas Angare
"Aparna Kumta" <[hidden email]> 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.

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. I'm very confused. Did your
message get stuck in a black hole for a few months?

Regards,

Niklas Angare
 


_______________________________________________
Boost-Testing mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-testing
Reply | Threaded
Open this post in threaded view
|

Re: [boost][testing] difference between using 'toolset' as an option to run.py and bjam_options

Aparna Kumta
On 10/30/15 16:22, Niklas Angare wrote:

> "Aparna Kumta" <[hidden email]> 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
> [hidden email]
> http://lists.boost.org/mailman/listinfo.cgi/boost-testing

_______________________________________________
Boost-Testing mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-testing