Changes in src/tests/test.py [d142ec5:16a63a78]
- File:
-
- 1 edited
-
src/tests/test.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/test.py
rd142ec5 r16a63a78 9 9 import re 10 10 import sys 11 import time12 11 13 12 ################################################################################ … … 96 95 parser.add_argument('--all', help='Run all test available', action='store_true') 97 96 parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true') 98 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int )97 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int, default='8') 99 98 parser.add_argument('--list-comp', help='List all valide arguments', action='store_true') 100 99 parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All if omitted', action='append') … … 137 136 138 137 # build, skipping to next test on error 139 before = time.time()140 138 make_ret, _ = make( test.target(), 141 139 redirects = "2> %s 1> /dev/null" % out_file, 142 140 error_file = err_file 143 141 ) 144 after = time.time()145 146 comp_dur = after - before147 148 run_dur = None149 142 150 143 # if the make command succeds continue otherwise skip to diff 151 144 if make_ret == 0 or settings.dry_run: 152 before = time.time()153 145 if settings.dry_run or fileIsExecutable(test.target()) : 154 146 # run test … … 157 149 # simply cat the result into the output 158 150 retcode, _ = sh("cat %s > %s" % (test.target(), out_file)) 159 160 after = time.time()161 run_dur = after - before162 151 else: 163 152 retcode, _ = sh("mv %s %s" % (err_file, out_file)) … … 185 174 sh("rm -f %s > /dev/null 2>&1" % test.target()) 186 175 187 return retcode, error , [comp_dur, run_dur]176 return retcode, error 188 177 189 178 # run a single test and handle the errors, outputs, printing, exception handling, etc. … … 194 183 name_txt = "%20s " % t.name 195 184 196 retcode, error , duration= run_single_test(t)185 retcode, error = run_single_test(t) 197 186 198 187 # update output based on current action 199 result_txt = TestResult.toString( retcode , duration)188 result_txt = TestResult.toString( retcode ) 200 189 201 190 #print result with error if needed
Note:
See TracChangeset
for help on using the changeset viewer.