Bug 592527 - runtest.py and runxpcshelltest.py should ignore ctrl-c when using an interactive debugger. r=ted, a=only-sorta-potb

This commit is contained in:
Justin Lebar 2010-08-31 18:03:38 -07:00
Родитель 436b2ef038
Коммит a3937f5ceb
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -860,11 +860,12 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
startTime = datetime.now()
if debuggerInfo and debuggerInfo["interactive"]:
# If an interactive debugger is attached, don't redirect output
# and don't use timeouts.
# If an interactive debugger is attached, don't redirect output,
# don't use timeouts, and don't capture ctrl-c.
timeout = None
maxTime = None
outputPipe = None
signal.signal(signal.SIGINT, lambda sigid, frame: None)
else:
outputPipe = subprocess.PIPE

Просмотреть файл

@ -423,6 +423,10 @@ class XPCShellTests(object):
self.debuggerInfo = getDebuggerInfo(self.oldcwd, debugger, debuggerArgs, debuggerInteractive)
self.profileName = profileName or "xpcshell"
# If we have an interactive debugger, disable ctrl-c.
if self.debuggerInfo and self.debuggerInfo["interactive"]:
signal.signal(signal.SIGINT, lambda signum, frame: None)
if not testdirs and not manifest:
# nothing to test!
print >>sys.stderr, "Error: No test dirs or test manifest specified!"