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

Contents of /trunk/downunder/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (show annotations)
Wed Feb 7 02:12:08 2018 UTC (19 months, 2 weeks ago) by jfenwick
File size: 1986 byte(s)
Make everyone sad by touching all the files

Copyright dates update

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2018 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 from os.path import splitext
18 Import('*')
19
20 local_env = env.Clone()
21
22 # files defining test runs (passing in a release)
23 testruns = Glob('run_*.py', strings=True)
24
25 # all tests
26 alltestruns = testruns
27
28 # test files are just compiled
29 test_pyc = env.PyCompile(testruns)
30 env.Alias('build_py_tests', test_pyc)
31
32 # add unit test to target alias
33 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/escript/test/python').abspath)
34 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/downunder/test/python').abspath)
35 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
36 local_env['ENV']['DOWNUNDER_TEST_DATA_ROOT']=Dir('ref_data').srcnode().abspath
37 local_env['ENV']['DOWNUNDER_WORKDIR']=Dir('.').abspath
38 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
39 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
40
41 # run all tests
42 program = local_env.RunPyUnitTest(alltestruns)
43 Depends(program, 'build_py_tests')
44
45 # add a group of tests
46 from grouptest import GroupTest
47 tgroup=GroupTest("downunder", "$PYTHONRUNNER ", (("DOWNUNDER_TEST_DATA_ROOT","$BATCH_ROOT/downunder/test/python/ref_data"),('DOWNUNDER_WORKDIR','$BUILD_DIR/downunder/test/python')), "$BATCH_ROOT/escript/test/python:$BATCH_ROOT/downunder/test/python", "$BATCH_ROOT/downunder/test/python", testruns)
48 tgroup.makeDir("$BUILD_DIR/downunder/test/python")
49 TestGroups.append(tgroup)
50

  ViewVC Help
Powered by ViewVC 1.1.26