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

Contents of /trunk/pycad/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3982 - (show annotations)
Fri Sep 21 03:23:22 2012 UTC (6 years, 11 months ago) by jfenwick
File size: 1751 byte(s)
More edits + removing pyvisi from trunk

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2012 by University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development since 2012 by School of Earth Sciences
13 #
14 ##############################################################################
15
16 from os.path import splitext
17 Import('*')
18
19 local_env = env.Clone()
20
21 # files defining test runs (passing in a release)
22 testruns = ['run_pycad_test.py']
23
24 # files defining tests run locally (not as part of a release)
25 localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
26
27 # all tests
28 alltestruns = testruns + localtestruns
29
30 # test files are just compiled - none of those in pycad yet
31 #sources = Glob('test_*.py')
32 #test_pyc = env.PyCompile(sources)
33 #env.Alias('build_py_tests', test_pyc)
34
35 # add unit test to target alias
36 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
37 local_env['ENV']['ESCRIPT_TEST_DATA_ROOT']=Dir('.').srcnode().abspath
38 local_env['ENV']['ESCRIPT_WORKDIR']=Dir('.').abspath
39 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
40 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
41
42 # run all tests
43 program = local_env.RunPyUnitTest(alltestruns)
44
45 # add a group of tests
46 from grouptest import *
47 tgroup=GroupTest("$PYTHONRUNNER ",(("ESCRIPT_TEST_DATA_ROOT","$BATCH_ROOT/pycad/test/python"),("ESCRIPT_WORKDIR","$BUILD_DIR/pycad/test/python")),"$BUILD_DIR/pycad/test/python","$BATCH_ROOT/pycad/test/python",testruns)
48 TestGroups.append(tgroup)
49

  ViewVC Help
Powered by ViewVC 1.1.26