/[escript]/branches/symbolic_from_3470/escript/test/python/SConscript
ViewVC logotype

Contents of /branches/symbolic_from_3470/escript/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3477 - (show annotations)
Fri Mar 18 00:20:06 2011 UTC (7 years, 11 months ago) by caltinay
File size: 1780 byte(s)
New test case for the symbolic module with evluator tests.

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 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 = []
21 testruns += ['run_xml.py']
22 testruns += ['run_units.py']
23 testruns += ['run_data_access.py']
24 testruns += ['run_symbolic.py']
25
26 # files defining tests run locally (not as part of a release)
27 localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
28
29 # all test
30 alltestruns = testruns + localtestruns
31
32 # test files are just compiled
33 sources = Glob('test_*.py')
34 test_pyc = env.PyCompile(sources)
35 env.Alias('build_py_tests', test_pyc)
36
37 # add unit test to target alias
38 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
39 local_env['ENV']['ESCRIPT_TEST_DATA_ROOT']=Dir('.').srcnode().abspath
40 local_env['ENV']['ESCRIPT_WORKDIR']=Dir('.').abspath
41 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
42 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
43
44 # run all tests
45 program = local_env.RunPyUnitTest(alltestruns)
46 Depends(program, py_wrapper_lib)
47 Depends(program, 'build_py_tests')
48
49 # add a group of tests
50 from grouptest import *
51 tgroup=GroupTest("$PYTHONRUNNER ",(("ESCRIPT_TEST_DATA_ROOT","$BATCH_ROOT/escript/test/python"),('ESCRIPT_WORKDIR','$BUILD_DIR/escript/test/python')),"$BUILD_DIR/escript/test/python","$BATCH_ROOT/escript/test/python",testruns)
52 TestGroups.append(tgroup)
53

  ViewVC Help
Powered by ViewVC 1.1.26