/[escript]/temp_trunk_copy/bruce/test/SConscript
ViewVC logotype

Annotation of /temp_trunk_copy/bruce/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 707 - (hide annotations)
Wed Apr 12 23:58:02 2006 UTC (13 years, 7 months ago) by gross
Original Path: trunk/bruce/test/SConscript
File size: 1321 byte(s)
latex build documentation is working now
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 robwdcock 668 local_env.Append(LIBS=[ python_lib, boost_lib, 'bruce', 'escript', 'esysUtils', 'CppUnitTest', sys_libs])
24    
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    
42 robwdcock 661 local_env.SConscript(dirs = ['#/bruce/test/python'], build_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26