Socket: Add short docs to internal classes
[senf.git] / senfscons / BoostUnitTests.py
index 7d250ad..2dce3ba 100644 (file)
@@ -1,9 +1,32 @@
+## \file
+# \brief BoostUnitTests build
+
+## \package senfscons.BoostUnitTests
+# \brief Builder utilizing the <a href="http://www.boost.org/libs/test/doc/index.html">Boost.Test</a> unit-test framework
+#
+# The BoostUnitTests builder will build a unit-test executable using
+# the <a
+# href="http://www.boost.org/libs/test/doc/index.html">Boost.Test</a>
+# library. After building, the unit-test will be executed.
+#
+# This builder is used by the SENFSCons.Object() helper to build the
+# unit test.
+#
+# \par Construction Envrionment Variables:
+# <table class="senf">
+# <tr><td>\c BOOSTTESTLIB</td><td>Name of the library to use, defaults to \c boost_unit_test_framework</td></tr>
+# <tr><td>\c BOOSTTESTARGS</td><td>Command line arguments of the test, defaults to <tt>--build_info=yes --log_level=test_suite</tt></td></tr>
+# </table>
+#
+# \todo This is not really a builder. This should be rewritten as one
+# \ingroup builder
+
 import SCons.Script.SConscript
 import SCons.Defaults
 import os.path
 import os
 
-def BoostUnitTests(env, target, source, test_source=None, LIBS = [], DEPENDS = [], **kw):
+def BoostUnitTests(env, target, source, test_source=None, LIBS = [], OBJECTS = [], DEPENDS = [], **kw):
     path, name = os.path.split(target)
     if test_source:
         if type(test_source) is not type([]):
@@ -15,7 +38,7 @@ def BoostUnitTests(env, target, source, test_source=None, LIBS = [], DEPENDS = [
     testEnv.Prepend(LIBS = LIBS)
     sources = []
     if source:
-        sources = sources + env.Object(source)
+        sources = sources + env.Object(source) + OBJECTS
     sources = sources + test_source
     binName = os.path.join(path,'.' + name +'.bin')
     testRunner = testEnv.Program(binName, sources)
@@ -28,7 +51,7 @@ def BoostUnitTests(env, target, source, test_source=None, LIBS = [], DEPENDS = [
 
 def dispatcher(*arg,**kw):
     return BoostUnitTests(*arg,**kw)
-    
+
 def generate(env):
     env['BOOSTTESTLIB'] = 'boost_unit_test_framework'
     env['BOOSTTESTARGS'] = [ '--build_info=yes', '--log_level=test_suite' ]