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

Annotation of /trunk/pycad/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3259 - (hide annotations)
Mon Oct 11 01:48:14 2010 UTC (9 years ago) by jfenwick
File size: 1736 byte(s)
Merging dudley and scons updates from branches

1 ksteube 1811
2     ########################################################
3 ksteube 1705 #
4 jfenwick 2881 # Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1705 #
8 ksteube 1811 # 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 ksteube 1705 #
12 ksteube 1811 ########################################################
13 ksteube 1705
14 jfenwick 3259 from os.path import splitext
15 gross 898 Import('*')
16 ksteube 1705
17 jfenwick 3259 local_env = env.Clone()
18 ksteube 1705
19 jfenwick 3259 # files defining test runs (passing in a release)
20     testruns = ['run_pycad_test.py']
21    
22 gross 898 # files defining tests run locally (not as part of a release)
23 jfenwick 3259 localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
24    
25     # all tests
26 gross 898 alltestruns = testruns + localtestruns
27    
28 jfenwick 3259 # test files are just compiled - none of those in pycad yet
29     #sources = Glob('test_*.py')
30     #test_pyc = env.PyCompile(sources)
31     #env.Alias('build_py_tests', test_pyc)
32    
33     # add unit test to target alias
34 gross 898 local_env.PrependENVPath('PYTHONPATH',str(env.Dir('#/build/$PLATFORM/pycad/test/python')))
35     local_env['ENV']['ESCRIPT_TEST_DATA_ROOT']=env.Dir('#/pycad/test/python').srcnode().abspath
36     local_env['ENV']['ESCRIPT_WORKDIR']=env.Dir('#/build/$PLATFORM/pycad/test/python').srcnode().abspath
37 jfenwick 3259 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
38     env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
39 gross 898
40 jfenwick 3259 # run all tests
41 gross 898 program = local_env.RunPyUnitTest(alltestruns)
42    
43 jfenwick 3259 # add a group of tests
44 jfenwick 2235 from grouptest import *
45     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)
46     TestGroups.append(tgroup)
47    

  ViewVC Help
Powered by ViewVC 1.1.26