/[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 642 - (hide annotations)
Thu Mar 23 14:03:49 2006 UTC (13 years, 7 months ago) by robwdcock
Original Path: branches/ROBW_XPLATFORM/bruce/test/SConscript
File size: 919 byte(s)
+ Bruce unit tests consolidated and added to build system

1 robwdcock 642 Import('*')
2    
3     program_name = 'bruce_UnitTest'
4    
5     local_env=env.Copy()
6    
7     local_env.Append(LIBS=[ python_lib, boost_lib, 'brucecpp', 'escriptcpp', 'esysUtils', 'CppUnitTest', sys_libs])
8    
9     src_dir = local_env.Dir('.').srcnode().abspath
10    
11     import os
12     filenames = os.listdir(src_dir)
13     sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
14    
15     program = local_env.Program(program_name, sources)
16    
17     Depends(program, dep_lib)
18    
19     # TODO: Need to decide on how the library paths etc are going to be handled
20     # TODO: For now just install the program to the same location as the libraries so things can run at least
21     test_install = local_env.Install(libinstall, program)
22    
23     #Add Unit Test to target alias
24    
25     env.Alias('build_tests', test_install)
26    
27     # run the tests - but only if test_targets are stale
28     local_env.RunUnitTest(program_name)
29     test_targets = os.path.splitext(program_name)[0]+'.passed'
30     Alias("run_tests", test_targets)
31    

  ViewVC Help
Powered by ViewVC 1.1.26