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

Contents of /trunk/pyvisi/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: 4369 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_camera.py']
22 testruns += ['run_carpet.py']
23 testruns += ['run_carpet_with_lazy_evaluation.py']
24 testruns += ['run_contour.py']
25 testruns += ['run_contour_with_lazy_evaluation.py']
26 testruns += ['run_datacollector.py']
27 testruns += ['run_ellipsoid.py']
28 testruns += ['run_ellipsoid_with_lazy_evaluation.py']
29 testruns += ['run_escript_with_lazy_evaluation.py']
30 testruns += ['run_exporter.py']
31 testruns += ['run_image.py']
32 testruns += ['run_image_with_lazy_evaluation.py']
33 testruns += ['run_legend.py']
34 testruns += ['run_legend_with_lazy_evaluation.py']
35 testruns += ['run_light.py']
36 testruns += ['run_logo.py']
37 testruns += ['run_logo_with_lazy_evaluation.py']
38 testruns += ['run_map.py']
39 testruns += ['run_map_with_lazy_evaluation.py']
40 testruns += ['run_movie_with_lazy_evaluation.py']
41 testruns += ['run_rectangle.py']
42 testruns += ['run_scene.py']
43 testruns += ['run_streamline.py']
44 testruns += ['run_streamline_with_lazy_evaluation.py']
45 testruns += ['run_text.py']
46 testruns += ['run_velocity.py']
47 testruns += ['run_velocity_with_lazy_evaluation.py']
48
49 # files defining tests run locally (not as part of a release)
50 localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
51
52 # all tests
53 alltestruns = testruns + localtestruns
54
55 # test files are just compiled - none of these in pyvisi
56 #sources = Glob('test_*.py')
57 #test_pyc = env.PyCompile(sources)
58 #env.Alias('build_py_tests', test_pyc)
59
60 # only run tests if pyvisi enabled
61 if env['pyvisi']:
62 # add unit test to target alias
63 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/pyvisi/test/python')))
64 local_env['ENV']['PYVISI_TEST_DATA_ROOT']=env.Dir('#/pyvisi/test/python').srcnode().abspath
65 local_env['ENV']['PYVISI_WORKDIR']=env.Dir('#/build/$PLATFORM/pyvisi/test/python').srcnode().abspath
66
67 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
68 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
69 program = local_env.RunPyUnitTest(alltestruns)
70 Depends(program, 'build_py_tests')
71
72 from grouptest import *
73 tgroup=GroupTest("$PYTHONRUNNER ",(("PYVISI_TEST_DATA_ROOT","$BATCH_ROOT/pyvisi/test/python"),("PYVISI_WORKDIR","$BUILD_DIR/pyvisi/test/python")),"$BUILD_DIR/pyvisi/test/python","$BATCH_ROOT/pyvisi/test/python",testruns)
74 tgroup.makeDir('$BUILD_DIR/pyvisi/test/')
75 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/')
76 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images')
77 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/camera')
78 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/carpet')
79 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/contour')
80 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/ellipsoid')
81 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/escript')
82 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/exporter')
83 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/image')
84 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/legend')
85 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/light')
86 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/logo')
87 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/map')
88 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/movie')
89 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/rectangle')
90 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/scene')
91 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/streamline')
92 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/text')
93 tgroup.makeDir('$BUILD_DIR/pyvisi/test/python/data_sample_images/velocity')
94 TestGroups.append(tgroup)
95

  ViewVC Help
Powered by ViewVC 1.1.26