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

Contents of /trunk/weipa/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6939 - (show annotations)
Mon Jan 20 03:37:18 2020 UTC (22 months, 1 week ago) by uqaeller
File size: 1811 byte(s)
Updated the copyright header.


1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2020 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 # Development from 2019 by School of Earth and Environmental Sciences
15 #
16 ##############################################################################
17
18
19 Import('*')
20 local_env = env.Clone()
21
22 if local_env['cppunit']:
23 # get the test source file names
24 sources = Glob('*.cpp')
25 testname='weipa_UnitTest'
26
27 # build the executable
28 local_env.AppendUnique(LIBS=env['weipa_libs']+env['cppunit_libs'])
29 if 'dudley' in env['domains']:
30 local_env.Append(CPPDEFINES = ['USE_DUDLEY'])
31 if 'finley' in env['domains']:
32 local_env.Append(CPPDEFINES = ['USE_FINLEY'])
33 if 'ripley' in env['domains']:
34 local_env.Append(CPPDEFINES = ['USE_RIPLEY'])
35 if 'speckley' in env['domains']:
36 local_env.Append(CPPDEFINES = ['USE_SPECKLEY'])
37 program = local_env.Program(testname, sources)
38
39 # run the tests - but only if test_targets are stale
40 local_env.RunUnitTest(testname)
41
42 # add unit test to target alias
43 Alias('build_tests', program)
44 Alias("run_tests", testname+'.passed')
45
46 # add a group of tests
47 from grouptest import GroupTest
48 tgroup=GroupTest("weipacpp", "$BINRUNNER ", (), "", "$BUILD_DIR/weipa/test", ('./'+testname,))
49 TestGroups.append(tgroup)
50
51 # configure python unit tests
52 local_env.SConscript('python/SConscript', duplicate=0)
53

  ViewVC Help
Powered by ViewVC 1.1.26