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

Contents of /trunk/finley/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26