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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3259 - (show annotations)
Mon Oct 11 01:48:14 2010 UTC (8 years, 11 months ago) by jfenwick
File size: 2579 byte(s)
Merging dudley and scons updates from branches

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_simplesolve.py']
30 testruns += ['run_utilOnFinley.py']
31 testruns += ['run_visualization_interface.py']
32
33 # files defining a few tests for a quick test
34 scalable_tests = []
35 scalable_tests += ['run_inputOutput.py']
36 scalable_tests += ['run_simplesolve.py']
37
38 # files defining tests run locally (not as part of a release)
39 localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
40
41 # all tests
42 alltestruns = testruns + localtestruns
43
44 # test files are just compiled - none of those in finley yet
45 #sources = Glob('test_*.py')
46 #test_pyc = env.PyCompile(sources)
47 #env.Alias('build_py_tests', test_pyc)
48
49 # add unit test to target alias
50 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/finley/test/python')))
51 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/escript/test/python')))
52 local_env['ENV']['FINLEY_TEST_DATA']=env.Dir('#/finley/test/python').srcnode().abspath
53 local_env['ENV']['FINLEY_WORKDIR']=env.Dir('#/build/$PLATFORM/finley/test/python').srcnode().abspath
54 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
55 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns ])
56 env.Alias('scalable_tests', [splitext(x)[0]+'.passed' for x in scalable_tests])
57
58 # run all tests
59 program = local_env.RunPyUnitTest(alltestruns)
60 Depends(program, py_wrapper_lib)
61
62 # add a group of tests
63 from grouptest import *
64 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)
65 tgroup.makeDir("$BUILD_DIR/finley/test/python")
66 TestGroups.append(tgroup)
67

  ViewVC Help
Powered by ViewVC 1.1.26