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

Contents of /trunk/escriptcore/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6145 - (show annotations)
Wed Apr 6 06:28:57 2016 UTC (2 years, 5 months ago) by caltinay
File size: 1541 byte(s)
now refraining from adding all libraries to all targets. So we don't link
unnecessary libraries, e.g. escript does not need parmetis etc...

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 Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
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 import re
18 Import('*')
19 local_env = env.Clone()
20
21 if local_env['cppunit']:
22 # get the test source file names
23 sources = Glob('*.cpp')
24 testname = 'escript_UnitTest'
25
26 # build the executable
27 local_env.AppendUnique(LIBS=env['escript_libs']+env['cppunit_libs'])
28 # some of these test files are too large to optimize
29 local_env['CCFLAGS'] = re.sub('-O[0-9]', '-g', str(local_env['CCFLAGS']))
30 program = local_env.Program(testname, sources)
31
32 # run the tests - but only if test_targets are stale
33 local_env.RunUnitTest(testname)
34
35 # add unit test to target alias
36 Alias('build_tests', program)
37 Alias("run_tests", testname+'.passed')
38
39 # add a group of tests
40 from grouptest import GroupTest
41 tgroup = GroupTest("escriptcpp", "$BINRUNNER ", (), "", "$BUILD_DIR/escriptcore/test", ('./'+testname,))
42 TestGroups.append(tgroup)
43
44 # configure python unit tests
45 local_env.SConscript('python/SConscript', duplicate=0)
46

  ViewVC Help
Powered by ViewVC 1.1.26