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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (14 years, 5 months ago) by ksteube
File size: 2238 byte(s)
Copyright updated in all files

1
2 ########################################################
3 #
4 # Copyright (c) 2003-2008 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
15 import os
16 Import('*')
17
18 local_env = clone_env(env)
19
20 src_dir = local_env.Dir('.').srcnode().abspath
21 filenames = os.listdir(src_dir)
22 #
23 # files defining tests but are not running by itself:
24 #
25 testfiles = [x for x in filenames if x.startswith('test_') and os.path.splitext(x)[1] in ['.py'] ]
26 #
27 # directories defining test data
28 #
29 testdata_dir = [x for x in filenames if x.startswith('data_') ]
30 #
31 # files defining test runs (passing in a release)
32 #
33 testruns = []
34 testruns += ['run_escriptOnFinley.py']
35 testruns += ['run_generators.py']
36 testruns += ['run_inputOutput.py']
37 testruns += ['run_linearPDEsOnFinley.py']
38 testruns += ['run_models.py']
39 testruns += ['run_simplesolve.py']
40 testruns += ['run_utilOnFinley.py']
41 testruns += ['run_visualization_interface.py']
42 #
43 # files defining tests run locally (not as part of a release)
44 #
45 localtestruns = [x for x in filenames if not x.startswith('run_') and os.path.splitext(x)[1] in ['.py']]
46 #
47 # all test
48 #
49 alltestruns = testruns + localtestruns
50 #
51 # test files are just compiled:
52 #
53 test_pyc = env.PyCompile(testfiles)
54 env.Alias('build_py_tests',test_pyc)
55
56 #Add Unit Test to target alias
57 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/finley/test/python')))
58 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/escript/test/python')))
59 local_env['ENV']['FINLEY_TEST_DATA']=env.Dir('#/finley/test/python').srcnode().abspath
60 local_env['ENV']['FINLEY_WORKDIR']=env.Dir('#/build/$PLATFORM/finley/test/python').srcnode().abspath
61 env.Alias('local_py_tests',[os.path.splitext(x)[0]+'.passed' for x in alltestruns])
62 env.Alias('py_tests', [os.path.splitext(x)[0]+'.passed' for x in testruns ])
63
64 #
65 # run all tests:
66 #
67 program = local_env.RunPyUnitTest(alltestruns)
68
69 Depends(program, local_env['pyinstall'])
70 Depends(program, dep_lib)
71 Depends(program, 'build_py_tests')

  ViewVC Help
Powered by ViewVC 1.1.26