##// END OF EJS Templates
Merge pull request #2442 from minrk/signithalt...
Bussonnier Matthias -
r8497:974c2c0b merge
parent child Browse files
Show More
@@ -396,6 +396,8 b' class IPTester(object):'
396 """Run the stored commands"""
396 """Run the stored commands"""
397 try:
397 try:
398 retcode = self._run_cmd()
398 retcode = self._run_cmd()
399 except KeyboardInterrupt:
400 return -signal.SIGINT
399 except:
401 except:
400 import traceback
402 import traceback
401 traceback.print_exc()
403 traceback.print_exc()
@@ -412,17 +414,22 b' class IPTester(object):'
412 continue # process is already dead
414 continue # process is already dead
413
415
414 try:
416 try:
415 print('Cleaning stale PID: %d' % subp.pid)
417 print('Cleaning up stale PID: %d' % subp.pid)
416 subp.kill()
418 subp.kill()
417 except: # (OSError, WindowsError) ?
419 except: # (OSError, WindowsError) ?
418 # This is just a best effort, if we fail or the process was
420 # This is just a best effort, if we fail or the process was
419 # really gone, ignore it.
421 # really gone, ignore it.
420 pass
422 pass
423 else:
424 for i in range(10):
425 if subp.poll() is None:
426 time.sleep(0.1)
427 else:
428 break
421
429
422 if subp.poll() is None:
430 if subp.poll() is None:
423 # The process did not die...
431 # The process did not die...
424 print('... failed. Manual cleanup may be required.'
432 print('... failed. Manual cleanup may be required.')
425 % subp.pid)
426
433
427 def make_runners(inc_slow=False):
434 def make_runners(inc_slow=False):
428 """Define the top-level packages that need to be tested.
435 """Define the top-level packages that need to be tested.
@@ -535,6 +542,9 b' def run_iptestall(inc_slow=False):'
535 res = runner.run()
542 res = runner.run()
536 if res:
543 if res:
537 failed.append( (name, runner) )
544 failed.append( (name, runner) )
545 if res == -signal.SIGINT:
546 print("Interrupted")
547 break
538 finally:
548 finally:
539 os.chdir(curdir)
549 os.chdir(curdir)
540 t_end = time.time()
550 t_end = time.time()
General Comments 0
You need to be logged in to leave comments. Login now