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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1384 - (hide annotations)
Fri Jan 11 02:29:38 2008 UTC (11 years, 9 months ago) by phornby
Original Path: temp_trunk_copy/bruce/test/SConscript
File size: 1320 byte(s)
Make a temp copy of the trunk before checking in the windows changes


1 gross 707 # 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 robwdcock 642 Import('*')
11    
12     program_name = 'bruce_UnitTest'
13    
14     local_env=env.Copy()
15    
16 gross 700 import os
17     # get the relevant file names:
18 robwdcock 642 src_dir = local_env.Dir('.').srcnode().abspath
19 gross 700 filenames = [ x for x in os.listdir(src_dir) if os.path.splitext(x)[1] in [".h", ".c", ".cpp"] ]
20 robwdcock 642
21     sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
22    
23 ksteube 1312 local_env.Append(LIBS=[ python_lib, boost_lib, 'bruce', 'escript', 'esysUtils', 'CppUnitTest', sys_libs])
24 robwdcock 668
25 gross 700 # compile test
26     program = local_env.Program(program_name, sources)
27 robwdcock 670 env.Alias('build_tests', program)
28 robwdcock 642
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 gross 700 release_srcfiles = [ env.File("SConscript"), ]
35     release_testfiles = [ env.File(x) for x in filenames ]
36     env.Zip(src_zipfile, release_srcfiles)
37     env.Tar(src_tarfile, release_srcfiles)
38     env.Zip(test_zipfile, release_testfiles)
39     env.Tar(test_tarfile, release_testfiles)
40    
41 robwdcock 661 local_env.SConscript(dirs = ['#/bruce/test/python'], build_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26