12
12
########################################################
18
local_env = clone_env(env_mpi)
20
# get the relevant file names:
21
src_dir = local_env.Dir('.').srcnode().abspath
22
filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
24
sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
26
local_env.Append(LIBS=['finley', 'escript', 'paso', 'esysUtils', 'CppUnitTest'] + env['sys_libs'])
29
program = local_env.Program('finley_UnitTest', sources)
30
env.Alias('build_tests', program)
15
local_env = env.Clone()
17
# get the test source file names
18
sources = Glob('*.cpp')+Glob('*.c')
19
testname='finley_UnitTest'
21
# build the executable
22
local_env.Append(LIBS=['finley', 'escript', 'paso', 'esysUtils', 'CppUnitTest'])
23
program = local_env.Program(testname, sources)
32
25
# run the tests - but only if test_targets are stale
33
local_env.RunUnitTest('finley_UnitTest')
34
test_targets = os.path.splitext('finley_UnitTest')[0]+'.passed'
35
Alias("run_tests", test_targets)
37
CallSConscript(local_env,dirs = ['#/finley/test/python'], variant_dir='python', duplicate=0)
39
# Add a group of tests
26
local_env.RunUnitTest(testname)
28
# add unit test to target alias
29
Alias('build_tests', program)
30
Alias("run_tests", testname+'.passed')
32
# configure python unit tests
33
local_env.SConscript(dirs = ['#/finley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])
35
# add a group of tests
40
36
from grouptest import *
41
tgroup=GroupTest("$BINRUNNER ", (),"","$BUILD_DIR/finley/test",('./finley_UnitTest',))
37
tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/finley/test", ('./'+testname,))
42
38
TestGroups.append(tgroup)