X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senfscons%2FBoostUnitTests.py;h=09d340a82fa2fc6f421b0d435001b232d0af2e74;hb=05fab45b5f96c457d3c6b359f66ce1506c6ad510;hp=2dce3ba1e2b94720319137e600039ed2825a8d12;hpb=9357448dc66bc9acfd3bd8db423deb75bcd6a2c4;p=senf.git diff --git a/senfscons/BoostUnitTests.py b/senfscons/BoostUnitTests.py index 2dce3ba..09d340a 100644 --- a/senfscons/BoostUnitTests.py +++ b/senfscons/BoostUnitTests.py @@ -26,22 +26,22 @@ import SCons.Defaults import os.path import os -def BoostUnitTests(env, target, source, test_source=None, LIBS = [], OBJECTS = [], DEPENDS = [], **kw): +def BoostUnitTests(env, target, objects, test_sources=None, LIBS = [], OBJECTS = [], DEPENDS = [], **kw): path, name = os.path.split(target) - if test_source: - if type(test_source) is not type([]): - test_source = [ test_source ] + if test_sources: + if type(test_sources) is not type([]): + test_sources = [ test_sources ] else: - test_source = [] + test_sources = [] testEnv = env.Copy(**kw) testEnv.Prepend(LIBS = '$BOOSTTESTLIB') testEnv.Prepend(LIBS = LIBS) - sources = [] - if source: - sources = sources + env.Object(source) + OBJECTS - sources = sources + test_source + all_objects = [] + if not objects: + objects = [] + all_objects = objects + env.Object(test_sources) + OBJECTS binName = os.path.join(path,'.' + name +'.bin') - testRunner = testEnv.Program(binName, sources) + testRunner = testEnv.Program(binName, all_objects) stamp = os.path.join(path,'.' + os.path.splitext(name)[0]+'.stamp') if DEPENDS: env.Depends(testRunner, DEPENDS)