New option for regression.py

Hello. I have done a patch for regression.py which adds a new option '--test-options'. I needed this to pass options to the actual test run. For example: python regression.py --toolset=tru64cxx65 --test-options='-sPYTHON_VERSION="2.3" -sPYTHON_ROOT="/opt" -sPYTHON_INCLUDES="/opt/include/python2.3 /opt/exec/OSF1-V5.1-alpha/include/python2.3"' Any interest in this? Markus

Markus Schöpflin wrote:
I have done a patch for regression.py which adds a new option '--test-options'. I needed this to pass options to the actual test run.
is it possible to have similar option, but only for selected toolsets? I could use it to run several toolsets together, that use the same environment variables: python regression.py --toolset=mingw,mingw-3.4.1 --test-options='mingw -sMINGW_ROOT=/mingw' --test-options='mingw-3.4.1 -sMINGW_ROOT=/mingw341' B.

Bronek Kozicki wrote:
Markus Schöpflin wrote:
I have done a patch for regression.py which adds a new option '--test-options'. I needed this to pass options to the actual test run.
is it possible to have similar option, but only for selected toolsets? I could use it to run several toolsets together, that use the same environment variables:
python regression.py --toolset=mingw,mingw-3.4.1 --test-options='mingw -sMINGW_ROOT=/mingw' --test-options='mingw-3.4.1 -sMINGW_ROOT=/mingw341'
Uhm, not sure how to do that. But what about python regression.py --toolset=foo,bar --test-options='foo-options','bar-options' That should be possible I think. Markus

Bronek Kozicki <brok@rubikon.pl> writes:
Markus Schöpflin wrote:
I have done a patch for regression.py which adds a new option --test-options'. I needed this to pass options to the actual test run.
is it possible to have similar option, but only for selected toolsets? I could use it to run several toolsets together, that use the same environment variables:
python regression.py --toolset=mingw,mingw-3.4.1 --test-options='mingw -sMINGW_ROOT=/mingw' --test-options='mingw-3.4.1 -sMINGW_ROOT=/mingw341'
Why don't you set up your mingw-3.4.1 toolset to use a different variable? { local MINGW_ROOT = MINGW341_ROOT ; extends-toolset mingw ; } -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

David Abrahams wrote:
Why don't you set up your mingw-3.4.1 toolset to use a different variable?
{
local MINGW_ROOT = MINGW341_ROOT ; extends-toolset mingw ; }
I'm under the impression this is not possible for all variables. E.g. I have toolsets which modify PYTHON_ROOT or BUILD. Those apparently can't be local variables. Worse, if I want to append to those variables, I have to protect against multiple appending since the toolset contents are executed for each target. (The file also is being reread for each target, btw, resulting in >1000 open/read/close operations for the toolset file) e.g. my intel-7.1-stdlib-native-linux toolset looks: { local INTEL_LINUX_VERSION = "70" ; local INTEL_LINUX_ROOT = "/usr/local/icc-7.1/compiler70" ; PYTHON_ROOT = "/usr/local/Python-2.2.3-intel" ; if ! $(gAddStdlibOption) { BUILD += "<stdlib>default" ; gAddStdlibOption = 1 ; } extends-toolset intel-linux ; } (I use only one toolset at a time.) Regards, m

Hi Markus,
I have done a patch for regression.py which adds a new option --test-options'.
Oh, wonderful!
I needed this to pass options to the actual test run.
For example:
python regression.py --toolset=tru64cxx65 --test-options='-sPYTHON_VERSION="2.3" -sPYTHON_ROOT="/opt" -sPYTHON_INCLUDES="/opt/include/python2.3 /opt/exec/OSF1-V5.1-alpha/include/python2.3"'
Any interest in this?
Definitely! I was thinking that might be calling it 'bjam-options' would be more precise, though. In any case, please post the patch! -- Aleksey Gurtovoy MetaCommunications Engineering

Aleksey Gurtovoy wrote:
Hi Markus,
I have done a patch for regression.py which adds a new option --test-options'.
Oh, wonderful!
I needed this to pass options to the actual test run.
For example:
python regression.py --toolset=tru64cxx65 --test-options='-sPYTHON_VERSION="2.3" -sPYTHON_ROOT="/opt" -sPYTHON_INCLUDES="/opt/include/python2.3 /opt/exec/OSF1-V5.1-alpha/include/python2.3"'
Any interest in this?
Definitely! I was thinking that might be calling it 'bjam-options' would be more precise, though. In any case, please post the patch!
The name bjam-options is fine with me. I will post the patch on monday. What do you think of the modification discussed in this thread? Namely python regression.py \ --toolset=foo,bar \ --bjam-options='foo-options','bar-options' Should I give this a try? Markus

Aleksey Gurtovoy wrote:
Definitely! I was thinking that might be calling it 'bjam-options' would be more precise, though. In any case, please post the patch!
See attached patch. Markus --- boost-cvs/tools/regression/xsl_reports/runner/regression.py Tue Aug 3 01:25:51 2004 +++ regression.py Fri Aug 27 07:28:55 2004 @@ -409,6 +409,7 @@ def test( toolsets + , bjam_options , monitored , timeout , args @@ -437,8 +438,9 @@ rmtree( results_status ) if "test" in args: - test_cmd = '%s -d2 --dump-tests "-sALL_LOCATE_TARGET=%s" >>%s 2>&1' % ( + test_cmd = '%s -d2 --dump-tests %s "-sALL_LOCATE_TARGET=%s" >>%s 2>&1' % ( bjam_command( toolsets ) + , bjam_options , regression_results , regression_log ) @@ -534,6 +536,7 @@ , user , comment , toolsets + , bjam_options , bjam_toolset , pjl_toolset , incremental @@ -558,7 +561,7 @@ get_source( user, tag, proxy, [] ) setup( comment, toolsets, bjam_toolset, pjl_toolset, monitored, proxy, [] ) - test( toolsets, monitored, timeout, [] ) + test( toolsets, bjam_options, monitored, timeout, [] ) collect_logs( tag, runner, platform, user, comment, incremental, [] ) upload_logs( tag, runner, user ) update_itself() @@ -601,6 +604,7 @@ , 'user=' , 'comment=' , 'toolsets=' + , 'bjam-options=' , 'bjam-toolset=' , 'pjl-toolset=' , 'timeout=' @@ -616,6 +620,7 @@ , '--platform' : sys.platform , '--user' : None , '--comment' : None + , '--bjam-options' : None , '--toolsets' : None , '--bjam-toolset' : None , '--pjl-toolset' : None @@ -640,6 +645,7 @@ , 'user' : options[ '--user' ] , 'comment' : options[ '--comment' ] , 'toolsets' : options[ '--toolsets' ] + , 'bjam_options' : options[ '--bjam-options' ] , 'bjam_toolset' : options[ '--bjam-toolset' ] , 'pjl_toolset' : options[ '--pjl-toolset' ] , 'incremental' : options.has_key( '--incremental' ) @@ -683,6 +689,7 @@ \t default) \t--user SourceForge user name for a shell/CVS account (optional) \t--toolsets comma-separated list of toolsets to test with (optional) +\t--bjam-options options to pass to the regression test (optional) \t--bjam-toolset bootstrap toolset for 'bjam' executable (optional) \t--pjl-toolset bootstrap toolset for 'process_jam_log' executable \t (optional)

Markus Schöpflin writes:
Aleksey Gurtovoy wrote:
Definitely! I was thinking that might be calling it 'bjam-options' would be more precise, though. In any case, please post the patch!
See attached patch.
Applied, thank you! -- Aleksey Gurtovoy MetaCommunications Engineering
participants (6)
-
Aleksey Gurtovoy
-
Bronek Kozicki
-
David Abrahams
-
Markus Schöpflin
-
Markus Schöpflin
-
Martin Wille