diff --git a/satscons/BoostUnitTests.py b/satscons/BoostUnitTests.py index 74a97ff120444f0935c27ff9a99360a818db2d83..78d399ad3b68188bd2eb1d76d0bf4886c5af6b57 100644 --- a/satscons/BoostUnitTests.py +++ b/satscons/BoostUnitTests.py @@ -13,11 +13,13 @@ def BoostUnitTests(env, target, source, test_source=None, LIBS = [], DEPENDS = [ testEnv = env.Copy(**kw) testEnv.Append(LIBS = '$BOOSTTESTLIB') testEnv.Append(LIBS = LIBS) - testRunner = testEnv.Program('test', env.Object(source) + test_source) + testRunner = testEnv.Program(target, env.Object(source) + test_source) if DEPENDS: env.Depends(testRunner, DEPENDS) - return env.Alias(target, env.Command(os.path.join(path,'.'+name+'.stamp'), testRunner, - [ './$SOURCE $BOOSSTTESTARGS', 'touch $TARGET' ])) + test = env.Command(os.path.join(path,'.'+name+'.stamp'), testRunner, + [ './$SOURCE $BOOSSTTESTARGS', 'touch $TARGET' ]) + env.Alias('all_tests', test) + return env.Alias(env.File('test'), test) def dispatcher(*arg,**kw): diff --git a/satscons/SConstruct.template b/satscons/SConstruct.template index e63f44702964880551926b2100c2dd98b0c514f7..27c68e35b641b1ab08b9ce127854fa74394e6ffd 100644 --- a/satscons/SConstruct.template +++ b/satscons/SConstruct.template @@ -18,4 +18,3 @@ Export('env') SConscript(glob.glob("*/SConscript")) SatSCons.StandardTargets(env) -SatSCons.AllTests(env) diff --git a/satscons/SatSCons.py b/satscons/SatSCons.py index 0a6d8d0c290fd1ad323112dbcabea08b5b3f16d6..92061a4d5f9b33fcab0c5dbcc4a6dc7c9356e9d6 100644 --- a/satscons/SatSCons.py +++ b/satscons/SatSCons.py @@ -105,7 +105,7 @@ def StandardObjects(env, sources, testSources = None, LIBS = []): LIBS = [ x for x in LIBS if x not in LOCAL_LIBS ] if testSources: testTargets.append(env.BoostUnitTests( - target = 'test', + target = 'test_runner', source = sources, test_source = testSources + LOCAL_LIBS, LIBS = LIBS, @@ -122,7 +122,3 @@ def StandardLib(env, library, sources, testSources = None, LIBS = []): lib = env.Library(library,objects) env.Default(lib) env.Append(**{ 'LIB_' + library : lib }) - -def AllTests(env): - tests = env.Alias('tests') - env.Depends(tests, testTargets)