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

Annotation of /trunk/weipa/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


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

Copyright dates update

1 caltinay 3344
2 jfenwick 3982 ##############################################################################
3 caltinay 3344 #
4 jfenwick 6651 # Copyright (c) 2003-2018 by The University of Queensland
5 jfenwick 3982 # http://www.uq.edu.au
6 caltinay 3344 #
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 3344 #
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 3344
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 = []
24     testruns += ['run_savevtk_tests.py']
25 caltinay 4042 testruns += ['run_savesilo_tests.py']
26 caltinay 3344
27     # files defining tests run locally (not as part of a release)
28     localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
29    
30     # all tests
31     alltestruns = testruns + localtestruns
32    
33 sshaw 5017 # test files are just compiled
34     test_pyc = env.PyCompile(alltestruns)
35     env.Alias('build_py_tests', test_pyc)
36    
37 caltinay 3344 # add unit test to target alias
38 caltinay 5028 local_env['ENV']['WEIPA_TEST_MESHES']=env.Dir('#/weipa/test/python').abspath
39 sshaw 5017 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
40     local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/weipa/test/python').abspath)
41 caltinay 3344 local_env['ENV']['WEIPA_TEST_MESHES']=env.Dir('#/weipa/test/python/meshes').abspath
42     local_env['ENV']['WEIPA_WORKDIR']=Dir('.').abspath
43     env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
44     env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
45    
46     # run all tests
47     program = local_env.RunPyUnitTest(alltestruns)
48 sshaw 5017 Depends(program, 'build_py_tests')
49 sshaw 5496 if env['usempi']:
50 sshaw 5527 Depends(program, env['prefix']+"/lib/pythonMPI")
51 caltinay 3344
52     # add a group of tests
53 caltinay 6034 from grouptest import GroupTest
54     tgroup=GroupTest("weipa", "$PYTHONRUNNER ", (("WEIPA_TEST_DATA","$BATCH_ROOT/weipa/test/python"),('WEIPA_WORKDIR','$BUILD_DIR/weipa/test/python')), "$BATCH_ROOT/escriptcore/test/python:$BATCH_ROOT/weipa/test/python", "$BATCH_ROOT/weipa/test/python", testruns)
55 caltinay 3344 tgroup.makeDir("$BUILD_DIR/weipa/test/python")
56     TestGroups.append(tgroup)
57    

  ViewVC Help
Powered by ViewVC 1.1.26