2
########################################################
4
# Copyright (c) 2003-2010 by University of Queensland
5
# Earth Systems Science Computational Center (ESSCC)
6
# http://www.uq.edu.au/esscc
8
# Primary Business: Queensland, Australia
9
# Licensed under the Open Software License version 3.0
10
# http://www.opensource.org/licenses/osl-3.0.php
12
########################################################
18
local_env = env.Clone()
20
# get the test source file names
21
sources = Glob('*.cpp')+Glob('*.c')
22
testname='dudley_UnitTest'
24
# build the executable
25
local_env.Append(LIBS=['dudley', 'escript', 'paso', 'esysUtils', 'CppUnitTest'])
26
program = local_env.Program(testname, sources)
28
# run the tests - but only if test_targets are stale
29
local_env.RunUnitTest(testname)
31
# add unit test to target alias
32
Alias('build_tests', program)
33
Alias("run_tests", testname+'.passed')
35
# configure python unit tests
36
local_env.SConscript(dirs = ['#/dudley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])
38
# add a group of tests
39
from grouptest import *
40
tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/dudley/test", ('./'+testname,))
41
TestGroups.append(tgroup)