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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1754 - (show annotations)
Sun Sep 7 22:07:26 2008 UTC (12 years ago) by ksteube
File size: 2261 byte(s)
Added new test suite run_inputOutput.py to systematically test I/O.
Can determine if two domains are same with Fourier analysis.
Added new method getNumDataPointsGlobal to return number of DPs of a distributed mesh.
Reading of tags in ReadMeshMPI failed occasionally, should be more robust now.

1 #
2 # $Id$
3 #
4 #######################################################
5 #
6 # Copyright 2003-2007 by ACceSS MNRF
7 # Copyright 2007 by University of Queensland
8 #
9 # http://esscc.uq.edu.au
10 # Primary Business: Queensland, Australia
11 # Licensed under the Open Software License version 3.0
12 # http://www.opensource.org/licenses/osl-3.0.php
13 #
14 #######################################################
15 #
16
17 import os
18 Import('*')
19
20 local_env = clone_env(env)
21
22 src_dir = local_env.Dir('.').srcnode().abspath
23 filenames = os.listdir(src_dir)
24 #
25 # files defining tests but are not running by itself:
26 #
27 testfiles = [x for x in filenames if x.startswith('test_') and os.path.splitext(x)[1] in ['.py'] ]
28 #
29 # directories defining test data
30 #
31 testdata_dir = [x for x in filenames if x.startswith('data_') ]
32 #
33 # files defining test runs (passing in a release)
34 #
35 testruns = []
36 testruns += ['run_escriptOnFinley.py']
37 testruns += ['run_generators.py']
38 testruns += ['run_inputOutput.py']
39 testruns += ['run_linearPDEsOnFinley.py']
40 testruns += ['run_models.py']
41 testruns += ['run_simplesolve.py']
42 testruns += ['run_utilOnFinley.py']
43 testruns += ['run_visualization_interface.py']
44 #
45 # files defining tests run locally (not as part of a release)
46 #
47 localtestruns = [x for x in filenames if not x.startswith('run_') and os.path.splitext(x)[1] in ['.py']]
48 #
49 # all test
50 #
51 alltestruns = testruns + localtestruns
52 #
53 # test files are just compiled:
54 #
55 test_pyc = env.PyCompile(testfiles)
56 env.Alias('build_py_tests',test_pyc)
57
58 #Add Unit Test to target alias
59 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/finley/test/python')))
60 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/escript/test/python')))
61 local_env['ENV']['FINLEY_TEST_DATA']=env.Dir('#/finley/test/python').srcnode().abspath
62 local_env['ENV']['FINLEY_WORKDIR']=env.Dir('#/build/$PLATFORM/finley/test/python').srcnode().abspath
63 env.Alias('local_py_tests',[os.path.splitext(x)[0]+'.passed' for x in alltestruns])
64 env.Alias('py_tests', [os.path.splitext(x)[0]+'.passed' for x in testruns ])
65
66 #
67 # run all tests:
68 #
69 program = local_env.RunPyUnitTest(alltestruns)
70
71 Depends(program, local_env['pyinstall'])
72 Depends(program, dep_lib)
73 Depends(program, 'build_py_tests')

  ViewVC Help
Powered by ViewVC 1.1.26