/[escript]/trunk/downunder/test/python/SConscript
ViewVC logotype

Contents of /trunk/downunder/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3949 - (show annotations)
Fri Aug 24 02:37:47 2012 UTC (7 years ago) by caltinay
File size: 1632 byte(s)
Added tests for mappings.

1
2 ########################################################
3 #
4 # Copyright (c) 2003-2012 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 from os.path import splitext
15 Import('*')
16
17 local_env = env.Clone()
18
19 # files defining test runs (passing in a release)
20 testruns = ['run_gravity.py',\
21 'run_mappings.py'
22 ]
23
24 # all tests
25 alltestruns = testruns
26
27 # add unit test to target alias
28 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/escript/test/python').abspath)
29 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
30 local_env['ENV']['DOWNUNDER_TEST_DATA_ROOT']=Dir('.').srcnode().abspath
31 local_env['ENV']['DOWNUNDER_WORKDIR']=Dir('.').abspath
32 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
33 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
34
35 # run all tests
36 program = local_env.RunPyUnitTest(alltestruns)
37 Depends(program, 'build_py_tests')
38
39 # add a group of tests
40 from grouptest import *
41 tgroup=GroupTest("$PYTHONRUNNER ",(("DOWNUNDER_TEST_DATA_ROOT","$BATCH_ROOT/downunder/test/python"),('DOWNUNDER_WORKDIR','$BUILD_DIR/downunder/test/python')),"$BUILD_DIR/escript/test/python:$BUILD_DIR/downunder/test/python","$BATCH_ROOT/downunder/test/python",testruns)
42 tgroup.makeDir("$BUILD_DIR/downunder/test")
43 tgroup.makeDir("$BUILD_DIR/downunder/test/python")
44 TestGroups.append(tgroup)
45

  ViewVC Help
Powered by ViewVC 1.1.26