/[escript]/branches/stage3.0/scons/scons_extensions.py
ViewVC logotype

Annotation of /branches/stage3.0/scons/scons_extensions.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 359 - (hide annotations)
Thu Dec 15 01:08:03 2005 UTC (13 years, 10 months ago) by jgs
Original Path: trunk/scons/scons_extensions.py
File MIME type: text/x-python
File size: 455 byte(s)
runUnitTest now returns an error code if the test fails

1 jgs 268 # Extensions to Scons
2    
3     import py_compile
4     import sys
5 jgs 297 import os
6 jgs 268
7     # Code to build .pyc from .py
8     def build_py(target, source, env):
9     py_compile.compile(str(source[0]), str(target[0]))
10     return None
11 jgs 297
12     # Code to run unit_test executables
13     def runUnitTest(target, source, env):
14     app = str(source[0].abspath)
15     if not os.system(app):
16     open(str(target[0]),'w').write("PASSED\n")
17 jgs 359 else:
18     open(str(target[0]),'w').write("FAILED\n")
19     return 1
20 jgs 297 return None

  ViewVC Help
Powered by ViewVC 1.1.26