/[escript]/branches/scons-dev/bruce/test/SConscript
ViewVC logotype

Contents of /branches/scons-dev/bruce/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1641 - (show annotations)
Tue Jul 15 00:23:45 2008 UTC (11 years, 3 months ago) by ksteube
File size: 1031 byte(s)
New SConstruct uses Configure() to determine which libraries/headers
are available.

Now using targets for each library instead of a target for the lib
directory...this gives better control over what gets built.

Source files are explicitly listed instead of discovered using glob.

This is not ready for use just yet.

1 # Copyright 2006 by ACcESS MNRF
2 #
3 # http://www.access.edu.au
4 # Primary Business: Queensland, Australia
5 # Licensed under the Open Software License version 3.0
6 # http://www.opensource.org/licenses/osl-3.0.php
7 #
8 #
9 #
10 Import('*')
11
12 program_name = 'bruce_UnitTest'
13
14 local_env=env.Copy()
15
16 import os
17 # get the relevant file names:
18 src_dir = local_env.Dir('.').srcnode().abspath
19 filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
20
21 sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
22
23 local_env.Append(LIBS=[ 'bruce', 'escript', 'esysUtils', 'CppUnitTest', sys_libs])
24
25 # compile test
26 program = local_env.Program(program_name, sources)
27 env.Alias('build_tests', program)
28
29 # run the tests - but only if test_targets are stale
30 local_env.RunUnitTest(program_name)
31 test_targets = os.path.splitext(program_name)[0]+'.passed'
32 Alias("run_tests", test_targets)
33
34 local_env.SConscript(dirs = ['#/bruce/test/python'], build_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26