From f86493e4661f99e8933fd50e696e8beac9803496 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 2 Sep 2007 23:57:40 +0200 Subject: [PATCH] SCons: run tests in bindir --- tests/SConscript | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/SConscript b/tests/SConscript index 63fd423ab..f2dd39dba 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -19,7 +19,7 @@ def SingleTestExecutableSubdir(env,tree): tree = env.subst(tree) # expand Construction Vars exeName = 'test-%s' % tree objects = srcSubtree(env,tree) - return env.Program(exeName, objects + corelib) + return env.Program('#$BINDIR/'+exeName, objects + corelib) def treatPluginTestcase(env): @@ -30,10 +30,10 @@ def treatPluginTestcase(env): prfx = 'plugin/example_plugin' oC = env.SharedObject(prfx, prfx+'.c') oCPP = env.SharedObject(prfx+'_cpp', prfx+'.cpp') - testplugin = ( env.SharedLibrary('.libs/example_plugin', oC, SHLIBPREFIX='') - + env.SharedLibrary('.libs/example_plugin_cpp', oCPP, SHLIBPREFIX='') + testplugin = ( env.SharedLibrary('#$BINDIR/.libs/example_plugin', oC, SHLIBPREFIX='') + + env.SharedLibrary('#$BINDIR/.libs/example_plugin_cpp', oCPP, SHLIBPREFIX='') ) - testExe = env.Program('test-plugin', ['plugin/plugin_main.c'] + corelib) + testExe = env.Program('#$BINDIR/test-plugin', ['plugin/plugin_main.c'] + corelib) env.Depends(testExe, testplugin) return testExe #-- it depentds (at the moment) on a specific isolated test-plugin, @@ -67,8 +67,10 @@ artifacts['testsuite'] = ts = [ SingleTestExecutableSubdir(env, dir) for dir in # testEnv = env.Clone() testEnv.Append(ENV = {'VALGRINDFLAGS' : 'DISABLE'}) +testDir = env.Dir('#$BINDIR') +runTest = env.File("test.sh").abspath -runTs = testEnv.Command(',testlog', ts, "./test.sh", chdir=1) +runTs = testEnv.Command(',testlog', ts, runTest, chdir=testDir)