Index: Lib/test/regrtest.py =================================================================== --- Lib/test/regrtest.py (revision 79494) +++ Lib/test/regrtest.py (working copy) @@ -371,6 +371,7 @@ good = [] bad = [] skipped = [] + omitted = [] resource_denieds = [] environment_changed = [] @@ -539,6 +540,7 @@ raise KeyboardInterrupt # What else? accumulate_result(test, result) except KeyboardInterrupt: + omitted.append(test) pending.close() for worker in workers: worker.join() @@ -561,6 +563,7 @@ print "Re-running test %r in verbose mode" % test runtest(test, True, quiet, testdir, huntrleaks) except KeyboardInterrupt: + omitted.append(test) # print a newline separate from the ^C print break @@ -580,8 +583,13 @@ if module not in save_modules and module.startswith("test."): test_support.unload(module) + if omitted: + print "Test suite interrupted by signal SIGINT." + omitted += list(tests) + print count(len(omitted), "test"), "omitted:" + printlist(omitted) if good and not quiet: - if not bad and not skipped and len(good) > 1: + if not bad and not skipped and not omitted and len(good) > 1: print "All", print count(len(good), "test"), "OK." if print_slow: @@ -646,7 +654,7 @@ if runleaks: os.system("leaks %d" % os.getpid()) - sys.exit(len(bad) > 0) + sys.exit(len(bad) > 0 or len(omitted) > 0) STDTESTS = [