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

Contents of /trunk/finley/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, 10 months ago) by jfenwick
File size: 2898 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_escriptOnFinley.py']
24 testruns += ['run_generators.py']
25 testruns += ['run_inputOutput.py']
26 testruns += ['run_linearPDEsOnFinley1.py']
27 testruns += ['run_linearPDEsOnFinley2.py']
28 testruns += ['run_linearPDEsOnFinley3.py']
29 testruns += ['run_linearPDEsOnFinleyMacro.py']
30 testruns += ['run_models.py']
31 testruns += ['run_darcy.py']
32 testruns += ['run_simplesolve.py']
33 testruns += ['run_utilOnFinley.py']
34 testruns += ['run_utilOnFinley2.py']
35 testruns += ['run_utilOnFinley3.py']
36 # testruns += ['run_visualization_interface.py']
37 testruns += ['run_amg.py']
38
39 # files defining a few tests for a quick test
40 scalable_tests = []
41 scalable_tests += ['run_inputOutput.py']
42 scalable_tests += ['run_simplesolve.py']
43
44 # files defining tests run locally (not as part of a release)
45 localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
46
47 # all tests
48 alltestruns = testruns + localtestruns
49
50 # test files are just compiled - none of those in finley yet
51 #sources = Glob('test_*.py')
52 #test_pyc = env.PyCompile(sources)
53 #env.Alias('build_py_tests', test_pyc)
54
55 # add unit test to target alias
56 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
57 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/escript/test/python').abspath)
58 local_env['ENV']['FINLEY_TEST_DATA']=Dir('.').srcnode().abspath
59 local_env['ENV']['FINLEY_WORKDIR']=Dir('.').abspath
60 # needed for a test from the util base class in escript
61 local_env['ENV']['ESCRIPT_WORKDIR']=Dir('.').abspath
62 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
63 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns ])
64 env.Alias('scalable_tests', [splitext(x)[0]+'.passed' for x in scalable_tests])
65
66 # run all tests
67 program = local_env.RunPyUnitTest(alltestruns)
68 Depends(program, [py_wrapper_lib, 'install_finley_py'])
69 Depends(program, 'build_py_tests')
70
71 # add a group of tests
72 from grouptest import *
73 tgroup=GroupTest("$PYTHONRUNNER ",(("FINLEY_TEST_DATA","$BATCH_ROOT/finley/test/python"),('FINLEY_WORKDIR','$BUILD_DIR/finley/test/python')),"$BUILD_DIR/escript/test/python:$BUILD_DIR/finley/test/python","$BATCH_ROOT/finley/test/python",testruns)
74 tgroup.makeDir("$BUILD_DIR/finley/test/python")
75 TestGroups.append(tgroup)
76

  ViewVC Help
Powered by ViewVC 1.1.26