12
12
########################################################
18
local_env = clone_env(env_mpi)
20
src_dir = local_env.Dir('.').srcnode().abspath
22
# get the relevant file names:
23
src_dir = local_env.Dir('.').srcnode().abspath
24
filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
26
sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
28
local_env.Append(LIBS=[ 'esysUtils', 'CppUnitTest', env['sys_libs']])
30
program = local_env.Program('EsysExceptionTest', sources)
32
#Add Unit Test to target alias
34
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='EsysExceptionTest'
21
# build the executable
22
local_env.Append(LIBS=['esysUtils', 'CppUnitTest'])
23
program = local_env.Program(testname, sources)
36
25
# run the tests - but only if test_targets are stale
37
local_env.RunUnitTest('EsysExceptionTest')
38
test_targets = os.path.splitext('EsysExceptionTest')[0]+'.passed'
39
Alias("run_tests", test_targets)
41
# 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
# add a group of tests
42
33
from grouptest import *
43
tgroup=GroupTest("$BINRUNNER ", (),"","$BUILD_DIR/esysUtils/test",('./EsysExceptionTest',))
34
tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/esysUtils/test", ('./'+testname,))
44
35
TestGroups.append(tgroup)