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

Annotation of /trunk/finley/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 676 - (hide annotations)
Sun Mar 26 10:13:34 2006 UTC (13 years, 5 months ago) by robwdcock
Original Path: branches/ROBW_XPLATFORM/finley/test/SConscript
File size: 772 byte(s)
+ Modified test SConscript dependencies to remove redundant call to explicit dependency
+ Modified scon_extensions.py - run unit tests (py and C++) now use scons::Execute rather than python os.system. This ensures the development environment
is used rather than the users environment to run the tests
+ SConstruct file now sets up LD_LIBRARY_PATH and PYTHONPATH to point to the current builds pyinstall and libinstall paths as required.
IT IS NO LONGER NECESSARY TO SET LD_LIBRARY_PATH and PYTHONPATH to point at your build outputs. Much safer in the presence of multiple checked out builds.
Under these circumstances you are better of using scons to run the tests rather than doing so directly. Easiest way to do this is to build the test output target for the test you want:
e.g. scons build/posix/bruce/test/python/ImportTest.passed
or if you prefer
cd build/posix/bruce/test/python
scons -u ImportTest.passed


1 robwdcock 649 Import('*')
2    
3     program_name = 'finley_UnitTest'
4    
5     local_env=env.Copy()
6    
7     src_dir = local_env.Dir('.').srcnode().abspath
8    
9     import os
10     filenames = os.listdir(src_dir)
11     sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
12    
13 robwdcock 668 local_env.Append(LIBS=[ python_lib, boost_lib, 'finley', 'escript', 'paso', 'esysUtils', 'CppUnitTest', scsl_libs, mkl_libs, umf_libs, sys_libs])
14    
15 robwdcock 649 program = local_env.Program(program_name, sources)
16    
17     #Add Unit Test to target alias
18    
19 robwdcock 670 env.Alias('build_tests', program)
20 robwdcock 649
21     # run the tests - but only if test_targets are stale
22     local_env.RunUnitTest(program_name)
23     test_targets = os.path.splitext(program_name)[0]+'.passed'
24     Alias("run_tests", test_targets)
25    
26 robwdcock 661 local_env.SConscript(dirs = ['#/finley/test/python'], build_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26