Boost logo

Boost-Commit :

From: jurko.gospodnetic_at_[hidden]
Date: 2008-01-06 15:43:25


Author: jurko
Date: 2008-01-06 15:43:25 EST (Sun, 06 Jan 2008)
New Revision: 42548
URL: http://svn.boost.org/trac/boost/changeset/42548

Log:
Added support for tests configuring whether they want their Boost Build to ignore toolset requirements instead of always ignoring them. Minor stylistic changes.
Text files modified:
   trunk/tools/build/v2/test/BoostBuild.py | 26 +++++++++++++++-----------
   1 files changed, 15 insertions(+), 11 deletions(-)

Modified: trunk/tools/build/v2/test/BoostBuild.py
==============================================================================
--- trunk/tools/build/v2/test/BoostBuild.py (original)
+++ trunk/tools/build/v2/test/BoostBuild.py 2008-01-06 15:43:25 EST (Sun, 06 Jan 2008)
@@ -148,10 +148,10 @@
     Optional argument `work_dir` indicates an absolute directory, where the test
     will run be run.
     """
- def __init__(self, arguments="", executable = 'bjam',
- match = TestCmd.match_exact, boost_build_path = None,
- translate_suffixes = True, pass_toolset = True,
- use_test_config = True, workdir = '', **keywords):
+ def __init__(self, arguments="", executable="bjam",
+ match=TestCmd.match_exact, boost_build_path=None,
+ translate_suffixes=True, pass_toolset=True, use_test_config=True,
+ ignore_toolset_requirements=True, workdir="", **keywords):
 
         self.original_workdir = os.getcwd()
         if workdir != '' and not os.path.isabs(workdir):
@@ -163,6 +163,7 @@
 
         self.toolset = get_toolset()
         self.pass_toolset = pass_toolset
+ self.ignore_toolset_requirements = ignore_toolset_requirements
 
         prepare_suffix_map(pass_toolset and self.toolset or 'gcc')
 
@@ -234,7 +235,6 @@
         program_list.append('-sBOOST_BUILD_PATH=' + boost_build_path)
         if verbosity:
             program_list += verbosity
- program_list += ["--ignore-toolset-requirements"]
         if arguments:
             program_list += arguments.split(" ")
 
@@ -359,9 +359,9 @@
     #
     # FIXME: Large portion copied from TestSCons.py, should be moved?
     #
- def run_build_system(
- self, extra_args='', subdir='', stdout = None, stderr = '', status = 0,
- match = None, pass_toolset = None, use_test_config = None, **kw):
+ def run_build_system(self, extra_args='', subdir='', stdout=None, stderr='',
+ status=0, match=None, pass_toolset=None, use_test_config=None,
+ ignore_toolset_requirements=None, **kw):
 
         if os.path.isabs(subdir):
             if stderr:
@@ -380,6 +380,9 @@
         if use_test_config is None:
             use_test_config = self.use_test_config
 
+ if ignore_toolset_requirements is None:
+ ignore_toolset_requirements = self.ignore_toolset_requirements
+
         try:
             kw['program'] = []
             kw['program'] += self.program
@@ -388,9 +391,10 @@
             if pass_toolset:
                 kw['program'].append("toolset=" + self.toolset)
             if use_test_config:
- kw['program'].append("--test-config=\""
- + os.path.join(self.original_workdir, "test-config.jam")
- + "\"")
+ kw['program'].append('--test-config="%s"'
+ % os.path.join(self.original_workdir, "test-config.jam"))
+ if ignore_toolset_requirements:
+ kw['program'].append("--ignore-toolset-requirements")
             kw['chdir'] = subdir
             apply(TestCmd.TestCmd.run, [self], kw)
         except:


Boost-Commit 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