Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55627 - in sandbox/SCons: libs tools/scons
From: loonycyborg_at_[hidden]
Date: 2009-08-17 13:46:41


Author: loonycyborg
Date: 2009-08-17 13:46:41 EDT (Mon, 17 Aug 2009)
New Revision: 55627
URL: http://svn.boost.org/trac/boost/changeset/55627

Log:
Build and run regression tests with 'scons --test lib1 lib2' instead of 'scons --test test'

Text files modified:
   sandbox/SCons/libs/SConscript | 6 +++---
   sandbox/SCons/tools/scons/boost-tests.py | 4 ++--
   2 files changed, 5 insertions(+), 5 deletions(-)

Modified: sandbox/SCons/libs/SConscript
==============================================================================
--- sandbox/SCons/libs/SConscript (original)
+++ sandbox/SCons/libs/SConscript 2009-08-17 13:46:41 EDT (Mon, 17 Aug 2009)
@@ -7,7 +7,7 @@
 
 sconscripts = Glob("*/build/SConscript")
 test_sconscripts = Glob("*/test/SConscript")
-env.AppendUnique(CPPDEFINES = ["${LINK_DYNAMIC and 'BOOST_' + BOOST_LIB + '_DYN_LINK=1' or []}"])
+env.AppendUnique(CPPDEFINES = ["${LINK_DYNAMIC and 'BOOST_' + BOOST_LIB.upper() + '_DYN_LINK=1' or []}"])
 for variant in env["variant"]:
     env["current_variant"] = variant
     env.SetProperty(profile = False)
@@ -31,10 +31,10 @@
             for sconscript in sconscripts:
                 lib = str(sconscript.get_dir().up())
                 VariantDir(src_dir = lib + "/build", variant_dir = lib + "/src", duplicate = False)
- env.SConscript("$BOOST_CURRENT_VARIANT_DIR/" + lib + "/src/SConscript", exports = { "env" : env.Clone(BOOST_LIB = lib.upper()) })
+ env.SConscript("$BOOST_CURRENT_VARIANT_DIR/" + lib + "/src/SConscript", exports = { "env" : env.Clone(BOOST_LIB = lib) })
             if GetOption("test"):
                 for sconscript in test_sconscripts:
                     lib = str(sconscript.get_dir().up())
- test_env = env.Clone(BOOST_LIB = lib.upper(), BOOST_TEST = True)
+ test_env = env.Clone(BOOST_LIB = lib, BOOST_TEST = True)
                     test_env.BoostUseLib(lib)
                     env.SConscript("$BOOST_CURRENT_VARIANT_DIR/" + lib + "/test/SConscript", exports = { "env" : test_env })

Modified: sandbox/SCons/tools/scons/boost-tests.py
==============================================================================
--- sandbox/SCons/tools/scons/boost-tests.py (original)
+++ sandbox/SCons/tools/scons/boost-tests.py 2009-08-17 13:46:41 EDT (Mon, 17 Aug 2009)
@@ -8,11 +8,11 @@
     AddOption('--test', dest='test', action="store_true")
 
     def BoostCompileTest(env, test, source = None, **kw):
- env.Alias("test", env.Object(test, (source is None) and (test + ".cpp") or source), **kw)
+ env.Alias("$BOOST_LIB", env.Object(test, (source is None) and (test + ".cpp") or source), **kw)
     def BoostRunTest(env, test, source = None, **kw):
         test_prog = env.Program(test, (source is None) and (test + ".cpp") or source, **kw)
         test = env.Command("$BOOST_LIB-"+test, test_prog, "./$SOURCE")
- env.Alias("test", test)
+ env.Alias("$BOOST_LIB", test)
     def BoostRunTests(env, tests, **kw):
         for test in Flatten(tests):
             env.BoostRunTest(test, **kw)


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