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

Contents of /trunk/weipa/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (show 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
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 = []
24 testruns += ['run_savevtk_tests.py']
25 testruns += ['run_savesilo_tests.py']
26
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 # test files are just compiled
34 test_pyc = env.PyCompile(alltestruns)
35 env.Alias('build_py_tests', test_pyc)
36
37 # add unit test to target alias
38 local_env['ENV']['WEIPA_TEST_MESHES']=env.Dir('#/weipa/test/python').abspath
39 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
40 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/weipa/test/python').abspath)
41 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 Depends(program, 'build_py_tests')
49 if env['usempi']:
50 Depends(program, env['prefix']+"/lib/pythonMPI")
51
52 # add a group of tests
53 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 tgroup.makeDir("$BUILD_DIR/weipa/test/python")
56 TestGroups.append(tgroup)
57

  ViewVC Help
Powered by ViewVC 1.1.26