ViewVC logotype

Contents of /branches/ROBW_XPLATFORM/escript/test/python/SConscript

Parent Directory Parent Directory | Revision Log Revision Log

Revision 676 - (show annotations)
Sun Mar 26 10:13:34 2006 UTC (15 years, 8 months ago) by robwdcock
File size: 732 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 Import('*')
3 local_env=env.Copy()
5 src_dir = local_env.Dir('.').srcnode().abspath
7 import os
8 filenames = os.listdir(src_dir)
9 python_src = [x for x in filenames if os.path.splitext(x)[1] in ['.py']]
11 # Filter out busted or not frequently run tests
12 python_src.remove('benchmark.py') # FIXME: fails to run
13 python_src.remove('SliceTest.py') # FIXME: fails to run
15 program = local_env.RunPyUnitTest(python_src)
17 Depends(program, pyinstall)
18 Depends(program, libinstall) # FIXME: The python tests require objects from finley hence you have to have all the libraries available rather than just dep_lib
20 #Add Unit Test to target alias
21 test_targets = [os.path.splitext(x)[0]+'.passed' for x in python_src]
23 env.Alias('py_tests',test_targets)

  ViewVC Help
Powered by ViewVC 1.1.26