/[escript]/release/4.0/ripley/test/SConscript
ViewVC logotype

Contents of /release/4.0/ripley/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5379 - (show annotations)
Mon Dec 15 23:58:17 2014 UTC (6 years, 9 months ago) by jfenwick
File size: 2045 byte(s)
branching for release prep

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2014 by 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'] and local_env['cuda']:
22 # get the test source file names
23 sources = Glob('*.cpp')
24 testname='ripley_UnitTest'
25
26 # build the executable
27 local_env.Prepend(LIBS=['ripley', 'pasowrap', 'paso', 'escript', 'esysUtils']+env['cppunit_libs'])
28
29 if local_env['silo']:
30 local_env.Append(CPPDEFINES = ['USE_SILO'])
31 local_env.AppendUnique(LIBS = env['silo_libs'])
32
33 if env['openmp']:
34 local_env.Append(CPPDEFINES = ['THRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_OMP'])
35
36 local_env['NVCCFLAGS'] += ' -w'
37 local_env['SHNVCCFLAGS'] += ' -w'
38 local_env.Append(CPPDEFINES = ['USE_CUDA', 'THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA'])
39 #TODO: This needs a config option:
40 local_env.Append(CPPDEFINES = ['CUSP_USE_TEXTURE_MEMORY'])
41 local_env.Append(LIBS = ['cudart'])
42
43 program = local_env.Program(testname, sources)
44
45 # run the tests - but only if test_targets are stale
46 local_env.RunUnitTest(testname)
47
48 # add unit test to target alias
49 Alias('build_tests', program)
50 Alias("run_tests", testname+'.passed')
51
52 # add a group of tests
53 from grouptest import *
54 tgroup=GroupTest("$BINRUNNER ", (), "", "$BUILD_DIR/ripley/test", ('./'+testname,))
55 TestGroups.append(tgroup)
56
57 # configure python unit tests
58 local_env.SConscript(dirs = ['#/ripley/test/python'], variant_dir='python', duplicate=0, exports=['py_wrapper_lib'])
59

  ViewVC Help
Powered by ViewVC 1.1.26