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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3985 - (show annotations)
Fri Sep 21 06:44:17 2012 UTC (9 years ago) by caltinay
File size: 1851 byte(s)
Unit test for ER Mapper reader.

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

  ViewVC Help
Powered by ViewVC 1.1.26