Changes in src/tests/test.py [16a63a78:ca54499]
- File:
-
- 1 edited
-
src/tests/test.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/test.py
r16a63a78 rca54499 9 9 import re 10 10 import sys 11 import time 11 12 12 13 ################################################################################ … … 136 137 137 138 # build, skipping to next test on error 139 before = time.time() 138 140 make_ret, _ = make( test.target(), 139 141 redirects = "2> %s 1> /dev/null" % out_file, 140 142 error_file = err_file 141 143 ) 144 after = time.time() 145 146 comp_dur = after - before 147 148 run_dur = None 142 149 143 150 # if the make command succeds continue otherwise skip to diff 144 151 if make_ret == 0 or settings.dry_run: 152 before = time.time() 145 153 if settings.dry_run or fileIsExecutable(test.target()) : 146 154 # run test … … 149 157 # simply cat the result into the output 150 158 retcode, _ = sh("cat %s > %s" % (test.target(), out_file)) 159 160 after = time.time() 161 run_dur = after - before 151 162 else: 152 163 retcode, _ = sh("mv %s %s" % (err_file, out_file)) … … 174 185 sh("rm -f %s > /dev/null 2>&1" % test.target()) 175 186 176 return retcode, error 187 return retcode, error, [comp_dur, run_dur] 177 188 178 189 # run a single test and handle the errors, outputs, printing, exception handling, etc. … … 183 194 name_txt = "%20s " % t.name 184 195 185 retcode, error = run_single_test(t)196 retcode, error, duration = run_single_test(t) 186 197 187 198 # update output based on current action 188 result_txt = TestResult.toString( retcode )199 result_txt = TestResult.toString( retcode, duration ) 189 200 190 201 #print result with error if needed
Note:
See TracChangeset
for help on using the changeset viewer.