Show More
@@ -396,6 +396,8 b' class IPTester(object):' | |||
|
396 | 396 | """Run the stored commands""" |
|
397 | 397 | try: |
|
398 | 398 | retcode = self._run_cmd() |
|
399 | except KeyboardInterrupt: | |
|
400 | return -signal.SIGINT | |
|
399 | 401 | except: |
|
400 | 402 | import traceback |
|
401 | 403 | traceback.print_exc() |
@@ -412,17 +414,22 b' class IPTester(object):' | |||
|
412 | 414 | continue # process is already dead |
|
413 | 415 | |
|
414 | 416 | try: |
|
415 | print('Cleaning stale PID: %d' % subp.pid) | |
|
417 | print('Cleaning up stale PID: %d' % subp.pid) | |
|
416 | 418 | subp.kill() |
|
417 | 419 | except: # (OSError, WindowsError) ? |
|
418 | 420 | # This is just a best effort, if we fail or the process was |
|
419 | 421 | # really gone, ignore it. |
|
420 | 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 | 430 | if subp.poll() is None: |
|
423 | 431 | # The process did not die... |
|
424 | print('... failed. Manual cleanup may be required.' | |
|
425 | % subp.pid) | |
|
432 | print('... failed. Manual cleanup may be required.') | |
|
426 | 433 | |
|
427 | 434 | def make_runners(inc_slow=False): |
|
428 | 435 | """Define the top-level packages that need to be tested. |
@@ -533,6 +540,9 b' def run_iptestall(inc_slow=False):' | |||
|
533 | 540 | res = runner.run() |
|
534 | 541 | if res: |
|
535 | 542 | failed.append( (name, runner) ) |
|
543 | if res == -signal.SIGINT: | |
|
544 | print("Interrupted") | |
|
545 | break | |
|
536 | 546 | finally: |
|
537 | 547 | os.chdir(curdir) |
|
538 | 548 | t_end = time.time() |
General Comments 0
You need to be logged in to leave comments.
Login now