/[escript]/trunk/dudley/test/SConscript
ViewVC logotype

Contents of /trunk/dudley/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6034 - (show annotations)
Wed Mar 9 00:37:57 2016 UTC (2 years, 8 months ago) by caltinay
File size: 1475 byte(s)
a few changes to GroupTest / utest:
GroupTest class now takes a name parameter that is used as (shell) function
name in utest for the test group.
By default all tests are run as before but one can now do:
./utest.sh build '-t2' escriptcpp
to only run the escript c++ unit tests.
Also tweaked a couple things so utest.sh does now work with dash.

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2016 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17
18 Import('*')
19 local_env = env.Clone()
20
21 if local_env['cppunit']:
22 # get the test source file names
23 sources = Glob('*.cpp')+Glob('*.c')
24 testname='dudley_UnitTest'
25
26 # build the executable
27 local_env.Prepend(LIBS=['dudley', 'paso', 'escript']+env['cppunit_libs'])
28 program = local_env.Program(testname, sources)
29
30 # run the tests - but only if test_targets are stale
31 local_env.RunUnitTest(testname)
32
33 # add unit test to target alias
34 Alias('build_tests', program)
35 Alias("run_tests", testname+'.passed')
36
37 # add a group of tests
38 from grouptest import GroupTest
39 tgroup=GroupTest("dudleycpp", "$BINRUNNER ", (), "", "$BUILD_DIR/dudley/test", ('./'+testname,))
40 TestGroups.append(tgroup)
41
42 # configure python unit tests
43 local_env.SConscript(dirs = ['#/dudley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])
44

  ViewVC Help
Powered by ViewVC 1.1.26