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

Contents of /trunk/finley/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (show annotations)
Wed Feb 7 02:12:08 2018 UTC (2 years, 1 month ago) by jfenwick
File size: 2559 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 # files defining a few tests for a quick test
26 scalable_tests = []
27 scalable_tests += ['run_inputOutput.py']
28 scalable_tests += ['run_pasoSolversOnFinley.py']
29
30 # files defining tests run locally (not as part of a release)
31 localtestruns = [x for x in Glob('*.py', strings=True) if not x.startswith('run_')]
32
33 # all tests
34 alltestruns = testruns + localtestruns
35
36 # test files are just compiled
37 sources = Glob('*.py')
38 test_pyc = env.PyCompile(sources)
39 env.Alias('build_py_tests', test_pyc)
40
41 # add unit test to target alias
42 local_env.PrependENVPath('PYTHONPATH', Dir('.').abspath)
43 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/finley/test/python').abspath)
44 local_env.PrependENVPath('PYTHONPATH', env.Dir('$BUILD_DIR/$PLATFORM/escriptcore/test/python').abspath)
45 local_env['ENV']['FINLEY_TEST_DATA'] = Dir('.').srcnode().abspath
46 local_env['ENV']['FINLEY_WORKDIR'] = Dir('.').abspath
47 # needed for a test from the util base class in escript
48 local_env['ENV']['ESCRIPT_WORKDIR'] = Dir('.').abspath
49 env.Alias('local_py_tests',[splitext(x)[0]+'.passed' for x in alltestruns])
50 env.Alias('py_tests', [splitext(x)[0]+'.passed' for x in testruns ])
51 env.Alias('scalable_tests', [splitext(x)[0]+'.passed' for x in scalable_tests])
52
53 # run all tests
54 program = local_env.RunPyUnitTest(alltestruns)
55 Requires(program, ['install_escript', 'build_py_tests'])
56 if env['usempi']:
57 Requires(program, ['install_pythonMPI'])
58
59 # add a group of tests
60 from grouptest import GroupTest
61 tgroup=GroupTest("finley", "$PYTHONRUNNER ", (("FINLEY_TEST_DATA","$BATCH_ROOT/finley/test/python"),('FINLEY_WORKDIR','$BUILD_DIR/finley/test/python')), "$BATCH_ROOT/escriptcore/test/python:$BATCH_ROOT/finley/test/python", "$BATCH_ROOT/finley/test/python", testruns)
62 tgroup.makeDir("$BUILD_DIR/finley/test/python")
63 TestGroups.append(tgroup)
64

  ViewVC Help
Powered by ViewVC 1.1.26