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

Annotation of /trunk/downunder/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

Copyright dates update

1 caltinay 3947
2 jfenwick 3982 ##############################################################################
3 caltinay 3947 #
4 jfenwick 6651 # Copyright (c) 2003-2018 by The University of Queensland
5 jfenwick 3982 # http://www.uq.edu.au
6 caltinay 3947 #
7     # Primary Business: Queensland, Australia
8 jfenwick 6112 # Licensed under the Apache License, version 2.0
9     # http://www.apache.org/licenses/LICENSE-2.0
10 caltinay 3947 #
11 jfenwick 3982 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 jfenwick 4657 # Development 2012-2013 by School of Earth Sciences
13     # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 jfenwick 3982 #
15     ##############################################################################
16 caltinay 3947
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 sshaw 5288 testruns = Glob('run_*.py', strings=True)
24 caltinay 3947
25     # all tests
26 caltinay 3949 alltestruns = testruns
27 caltinay 3947
28 sshaw 5017 # test files are just compiled
29     test_pyc = env.PyCompile(testruns)
30     env.Alias('build_py_tests', test_pyc)
31    
32 caltinay 3947 # add unit test to target alias
33     local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/escript/test/python').abspath)
34 sshaw 5017 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/downunder/test/python').abspath)
35 caltinay 3947 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
36 caltinay 3985 local_env['ENV']['DOWNUNDER_TEST_DATA_ROOT']=Dir('ref_data').srcnode().abspath
37 caltinay 3947 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 caltinay 6034 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 caltinay 3947 tgroup.makeDir("$BUILD_DIR/downunder/test/python")
49     TestGroups.append(tgroup)
50    

  ViewVC Help
Powered by ViewVC 1.1.26