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

Annotation of /trunk/weipa/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3176 - (hide annotations)
Sat Sep 11 01:09:54 2010 UTC (11 years, 2 months ago) by caltinay
File size: 1553 byte(s)
Maybe this will finally make the Mac happy.

1 caltinay 3104
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 caltinay 3176 local_env.Append(LIBS=['weipa', 'escript', 'finley', 'CppUnitTest'] + local_env['sys_libs'] )
28 caltinay 3151 if local_env['usesilo']:
29     local_env.Append(CPPDEFINES = ['USE_SILO'])
30     local_env.AppendUnique(LIBS = [env['silo_libs']])
31 caltinay 3104
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