/[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 763 - (hide annotations)
Fri Jun 30 05:52:31 2006 UTC (13 years, 3 months ago) by gross
Original Path: trunk/scons/scons_extensions.py
File MIME type: text/x-python
File size: 1272 byte(s)
some modification in the element reordering which should solve some problems 
caused by the fact that qsort may handels == items differently on different platform.


1 elspeth 645
2     # Copyright 2006 by ACcESS MNRF
3     #
4     # http://www.access.edu.au
5     # Primary Business: Queensland, Australia
6     # Licensed under the Open Software License version 3.0
7     # http://www.opensource.org/licenses/osl-3.0.php
8     #
9    
10    
11 jgs 268 # Extensions to Scons
12    
13     import py_compile
14     import sys
15 jgs 297 import os
16 gross 763 import time
17 jgs 268
18     # Code to build .pyc from .py
19     def build_py(target, source, env):
20     py_compile.compile(str(source[0]), str(target[0]))
21     return None
22 jgs 297
23     # Code to run unit_test executables
24     def runUnitTest(target, source, env):
25 ksteube 760 time_start = time.time()
26 jgs 297 app = str(source[0].abspath)
27 robwdcock 682 if not env.Execute(app):
28 jgs 297 open(str(target[0]),'w').write("PASSED\n")
29 jgs 359 else:
30     return 1
31 ksteube 760 print "Test execution time: ", round(time.time() - time_start), "seconds wall time"
32 jgs 297 return None
33 cochrane 370
34 robwdcock 682 def runPyUnitTest(target, source, env):
35 ksteube 760 time_start = time.time()
36 robwdcock 682 app = 'python '+str(source[0].abspath)
37     if not env.Execute(app):
38     open(str(target[0]),'w').write("PASSED\n")
39     else:
40     return 1
41 ksteube 760 print "Test execution time: ", round(time.time() - time_start), "seconds wall time"
42 robwdcock 682 return None

  ViewVC Help
Powered by ViewVC 1.1.26