/[escript]/release/5.2/speckley/test/python/SConscript
ViewVC logotype

Contents of /release/5.2/speckley/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6692 - (show annotations)
Mon Jun 25 02:31:06 2018 UTC (3 years, 3 months ago) by jfenwick
File size: 1989 byte(s)
Fix

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 # add unit test to target alias
26 local_env.PrependENVPath('PYTHONPATH', Dir('#/speckley/test/python/').abspath)
27 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
28 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/escriptcore/test/python').abspath)
29 local_env['ENV']['SPECKLEY_TEST_DATA'] = Dir('.').srcnode().abspath
30 local_env['ENV']['SPECKLEY_WORKDIR'] = Dir('.').abspath
31 # needed for a test from the util base class in escript
32 local_env['ENV']['ESCRIPT_WORKDIR'] = Dir('.').abspath
33 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in testruns])
34 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns])
35
36 # run all tests
37 program = local_env.RunPyUnitTest(testruns)
38 Requires(program, ['install_escript', 'build_py_tests'])
39 if env['usempi']:
40 Requires(program, ['install_pythonMPI'])
41
42 # Add a group of tests
43 from grouptest import GroupTest
44 tgroup=GroupTest("speckley", "$PYTHONRUNNER ", (("SPECKLEY_TEST_DATA","$BATCH_ROOT/speckley/test/python"),('SPECKLEY_WORKDIR','$BUILD_DIR/speckley/test/python')), "$BATCH_ROOT/escriptcore/test/python:$BATCH_ROOT/speckley/test/python", "$BATCH_ROOT/speckley/test/python", testruns)
45 tgroup.makeDir("$BUILD_DIR/speckley/test/python")
46 TestGroups.append(tgroup)
47

  ViewVC Help
Powered by ViewVC 1.1.26