/[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 652 - (hide annotations)
Fri Mar 24 07:34:18 2006 UTC (17 years ago) by robwdcock
File size: 993 byte(s)
+Add py_tests targets and get script ones running

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)
31 robwdcock 652
32     local_env.SConscript(dirs = ['#/escript/test/python'], build_dir='py', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26