Changeset 1582
- Timestamp:
- 06/20/08 12:22:40 (4 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/qa/run-tests.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1580 r1582 1 1 2008-06-20 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * qa/run-tests.py: Try to handle when -d (pause for debug) and 4 -t (pararell threads) are used together in the best possible way. 2 5 3 6 * cherokee/buffer.c (cherokee_buffer_decode_base64): Fixes an cherokee/trunk/qa/run-tests.py
r1559 r1582 107 107 else: 108 108 pause = sys.maxint 109 110 # Check threads and pauses 111 if thds > 1 and pause > 1: 112 print "ERROR: -d and -t are incompatible with each other." 113 sys.exit(1) 109 114 110 115 # Check the interpreters … … 291 296 os.kill (pid, signal.SIGKILL) 292 297 293 def mainloop_iterator(objs): 298 def do_pause(): 299 global pause 300 print "Press <Enter> to continue.." 301 sys.stdin.readline() 302 pause = pause - 1 303 304 def mainloop_iterator(objs, main_thread=True): 294 305 global port 295 306 global pause … … 312 323 go_ahead = obj.Precondition() 313 324 314 if go_ahead and pause > 0: 315 print "Press <Enter> to continue.." 316 sys.stdin.readline() 317 pause = pause - 1 325 if go_ahead and pause > 0 and main_thread: 326 do_pause() 318 327 319 328 if not quiet: … … 359 368 port = 443 360 369 370 # If we want to pause once do it before launching the threads 371 if pause == 1: 372 do_pause() 373 361 374 # Maybe launch some threads 362 375 for n in range(thds-1): 363 objs_copy = map (lambda x: copy.copy(x), objs)364 365 376 t = (n * 1.0 / (thds-1)) 366 377 time.sleep(t) 367 378 368 thread.start_new_thread (mainloop_iterator, (objs _copy,))379 thread.start_new_thread (mainloop_iterator, (objs[:], False)) 369 380 370 381 # Execute the tests