25 |
],'utilities':[ |
],'utilities':[ |
26 |
'utilities_ascEnvVar','utilities_ascPrint' |
'utilities_ascEnvVar','utilities_ascPrint' |
27 |
,'utilities_ascSignal','utilities_readln','utilities_set' |
,'utilities_ascSignal','utilities_readln','utilities_set' |
28 |
,'linear_qrrank','linear_mtx','utilities_error' |
,'utilities_error' |
29 |
],'linear':['linear_qrrank','linear_mtx'] |
],'linear':['linear_qrrank','linear_mtx'] |
30 |
,'compiler':[ |
,'compiler':[ |
31 |
'compiler_basics','compiler_expr','compiler_fixfree','compiler_fixassign' |
'compiler_basics','compiler_expr','compiler_fixfree','compiler_fixassign' |
32 |
],'packages':['packages_defaultall'] |
],'packages':['packages_defaultall'] |
33 |
,'solver':[ |
,'solver':[ |
34 |
'solver_slv_common','solver_slvreq','solver_ipopt','solver_qrslv' |
'solver_slv_common','solver_slvreq','solver_qrslv' |
35 |
,'solver_fprops','solver_lrslv' |
,'solver_fprops','solver_lrslv' #'solver_ipopt', |
36 |
],'integrator':['integrator_lsode'] |
],'integrator':['integrator_lsode'] |
37 |
} |
} |
38 |
|
|
39 |
import subprocess |
import subprocess |
40 |
LCOV_CD=[LCOV,'-c','-d',PREFIX,'--no-external'] |
LCOV_STEM=[LCOV,'-d',PREFIX,'--no-external','--exclude','\<stdout\>'] |
41 |
|
LCOV_CD=LCOV_STEM + ['-c'] |
42 |
# clean |
# clean |
43 |
print "CLEANING UP" |
print "CLEANING UP" |
44 |
subprocess.check_call(SCONS_CALL + ['-c'],stdout=DEVNULL) |
subprocess.check_call(SCONS_CALL + ['-c'],stdout=DEVNULL) |
47 |
print "BUILD" |
print "BUILD" |
48 |
subprocess.check_call(SCONS_CALL,stdout=DEVNULL,stderr=DEVNULL) |
subprocess.check_call(SCONS_CALL,stdout=DEVNULL,stderr=DEVNULL) |
49 |
|
|
50 |
#baseline |
if 0: |
51 |
print "BASELINE" |
#baseline |
52 |
F_BASELINE = 'mycov-0.info' |
print "BASELINE" |
53 |
mycall = LCOV_CD + ['-i','-o',F_BASELINE] |
F_BASELINE = 'mycov-0.info' |
54 |
#print "CALL:",mycall |
mycall = LCOV_CD + ['-i','-o',F_BASELINE] |
55 |
subprocess.check_call(mycall,stdout=DEVNULL) |
#print "CALL:",mycall |
56 |
|
subprocess.check_call(mycall,stdout=DEVNULL) |
57 |
|
else: |
58 |
|
print "ZERO" |
59 |
|
mycall = LCOV_STEM + ['-z'] |
60 |
|
subprocess.check_call(mycall,stdout=DEVNULL) |
61 |
|
|
62 |
myenv = os.environ.copy() |
myenv = os.environ.copy() |
63 |
myenv['ASCENDLIBRARY']='models:solvers/qrslv:solvers/ipopt:solvers/lrslv' |
myenv['ASCENDLIBRARY']='models:solvers/qrslv:solvers/ipopt:solvers/lrslv' |
64 |
myenv['LD_LIBRARY_PATH']='.' |
myenv['LD_LIBRARY_PATH']='.' |
65 |
|
|
66 |
for t in tests: |
for t in tests: |
67 |
print "TEST '%s'" % (t,) |
print "TEST '%s'" % (t,) |
68 |
|
print " ".join(tests[t]) |
69 |
subprocess.check_call(['test/test']+tests[t],env=myenv,stdout=DEVNULL,stderr=DEVNULL) |
subprocess.check_call(['test/test']+tests[t],env=myenv,stdout=DEVNULL,stderr=DEVNULL) |
70 |
F = 'mycov-%s.info' % (t,) |
F = 'mycov-%s.info' % (t,) |
71 |
subprocess.check_call(LCOV_CD + ['-o',F,'-t',t],stdout=DEVNULL) |
subprocess.check_call(LCOV_CD + ['-o',F,'-t',t],stdout=DEVNULL) |
73 |
subprocess.check_call([LCOV,'-r',F,'*stdout*','-o',F1],stdout=DEVNULL) |
subprocess.check_call([LCOV,'-r',F,'*stdout*','-o',F1],stdout=DEVNULL) |
74 |
|
|
75 |
subprocess.check_call([GENHTML |
subprocess.check_call([GENHTML |
|
,'-b',F_BASELINE |
|
76 |
,'-p',PREFIX |
,'-p',PREFIX |
77 |
,'-o','lcov-html' |
,'-o','lcov-html' |
78 |
,'-t','ASCEND - CUnit test coverage' |
,'-t','ASCEND - CUnit test coverage' |