/[escript]/branches/scons_revamp_from_3210/weipa/test/SConscript
ViewVC logotype

Contents of /branches/scons_revamp_from_3210/weipa/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3212 - (show annotations)
Tue Sep 28 01:06:07 2010 UTC (10 years, 6 months ago) by caltinay
File size: 1550 byte(s)
First iteration:
- cleanup of main SConstruct file
- new template options file with commented options
- moved our extensions to the "proper" place according to scons docs
- fixed a regex issue in wrapper script
- this version works on guineapig and shake75

1
2 ########################################################
3 #
4 # Copyright (c) 2003-2010 by University of Queensland
5 # Earth Systems Science Computational Center (ESSCC)
6 # http://www.uq.edu.au/esscc
7 #
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
11 #
12 ########################################################
13
14 import os, re
15 Import('*')
16
17 local_env = clone_env(env_mpi)
18
19 src_dir = local_env.Dir('.').srcnode().abspath
20
21 # get the relevant file names:
22 src_dir = local_env.Dir('.').srcnode().abspath
23 filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
24
25 sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
26
27 local_env.Append(LIBS=['weipa', 'escript', 'finley', 'CppUnitTest'] + local_env['sys_libs'] )
28 if local_env['silo']:
29 local_env.Append(CPPDEFINES = ['USE_SILO'])
30 local_env.AppendUnique(LIBS = [env['silo_libs']])
31
32 program = local_env.Program('weipa_UnitTest', sources)
33
34 #Add Unit Test to target alias
35 local_env.Alias('build_tests', program)
36
37 # run the tests - but only if test_targets are stale
38 local_env.RunUnitTest('weipa_UnitTest')
39 test_targets = os.path.splitext('weipa_UnitTest')[0]+'.passed'
40 Alias("run_tests", test_targets)
41
42 # Add a group of tests
43 from grouptest import *
44 tgroup=GroupTest("$BINRUNNER ", (),"","$BUILD_DIR/weipa/test",('./weipa_UnitTest',))
45 TestGroups.append(tgroup)
46
47 #CallSConscript(local_env,dirs = ['#/weipa/test/python'], variant_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26