/[escript]/branches/ROBW_XPLATFORM/escript/test/SConscript
ViewVC logotype

Annotation of /branches/ROBW_XPLATFORM/escript/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 638 - (hide annotations)
Thu Mar 23 13:06:01 2006 UTC (13 years, 6 months ago) by robwdcock
File size: 908 byte(s)
+Unit tests unified into escript_UnitTest
+SConscript support for build_tests and run_tests

1 robwdcock 638 Import('*')
2    
3     program_name = 'escript_UnitTest'
4    
5     local_env=env.Copy()
6    
7     local_env.Append(LIBS=[ python_lib, boost_lib, '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)

  ViewVC Help
Powered by ViewVC 1.1.26