/[escript]/trunk/escript/test/SConscript
ViewVC logotype

Annotation of /trunk/escript/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 667 - (hide annotations)
Fri Mar 24 13:25:00 2006 UTC (13 years, 4 months ago) by robwdcock
Original Path: branches/ROBW_XPLATFORM/escript/test/SConscript
File size: 997 byte(s)
+ OUCH ARGHH
+ Okay the wizzy linkHack doesn't work. Not sure why but py_tests fail
when the shared library is on the link line directly (without a -l)

+ Unfortunately we can't figure out how to use -l without it prepending
a lib prefix. Hence all the shareable objects in python now need to be
called libblah.so (and lib will need to be prepended on windows!!!!).
This is not the python way and its very annoying. Why do we have this
problem? Because the C++ shared libraries link with each other.


1 robwdcock 638 Import('*')
2    
3     program_name = 'escript_UnitTest'
4    
5     local_env=env.Copy()
6    
7 robwdcock 667 local_env.Append(LIBS=[ python_lib, boost_lib, 'escriptcpp', 'esysUtils', 'CppUnitTest', sys_libs])
8 robwdcock 638
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 robwdcock 661 local_env.SConscript(dirs = ['#/escript/test/python'], build_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26