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

Annotation of /trunk/weipa/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3104 - (hide annotations)
Wed Aug 25 00:53:25 2010 UTC (11 years, 3 months ago) by caltinay
File size: 1409 byte(s)
Set up initial test suite files for weipa and some basic preliminary tests.

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     local_env.Append(LIBS=['weipa', 'CppUnitTest'] + local_env['sys_libs'] )
28    
29     program = local_env.Program('weipa_UnitTest', sources)
30    
31     #Add Unit Test to target alias
32     local_env.Alias('build_tests', program)
33    
34     # run the tests - but only if test_targets are stale
35     local_env.RunUnitTest('weipa_UnitTest')
36     test_targets = os.path.splitext('weipa_UnitTest')[0]+'.passed'
37     Alias("run_tests", test_targets)
38    
39     # Add a group of tests
40     from grouptest import *
41     tgroup=GroupTest("$BINRUNNER ", (),"","$BUILD_DIR/weipa/test",('./weipa_UnitTest',))
42     TestGroups.append(tgroup)
43    
44     #CallSConscript(local_env,dirs = ['#/weipa/test/python'], variant_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26