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

Contents of /trunk/escript/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3982 - (show annotations)
Fri Sep 21 03:23:22 2012 UTC (6 years, 11 months ago) by jfenwick
File size: 1962 byte(s)
More edits + removing pyvisi from trunk

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

  ViewVC Help
Powered by ViewVC 1.1.26