From 8b56298543ed1d6abbb021b82351304ec1301f66 Mon Sep 17 00:00:00 2001 From: Chris Manchester Date: Wed, 15 Jul 2015 16:52:27 -0700 Subject: [PATCH] Bug 890026 - Use kill_and_get_minidump in place of crashinject.exe in mochitest so we can stacks from more hangs. r=ted --- testing/mochitest/runtests.py | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 2c7b8e39042..9f1c1c54837 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -1577,26 +1577,15 @@ class Mochitest(MochitestUtilsMixin): self.dumpScreen(utilityPath) if mozinfo.info.get('crashreporter', True) and not debuggerInfo: - if mozinfo.isWin: - # We should have a "crashinject" program in our utility path - crashinject = os.path.normpath( - os.path.join( - utilityPath, - "crashinject.exe")) - if os.path.exists(crashinject): - status = subprocess.Popen( - [crashinject, str(processPID)]).wait() - printstatus(status, "crashinject") - if status == 0: - return - else: - try: - os.kill(processPID, signal.SIGABRT) - except OSError: - # https://bugzilla.mozilla.org/show_bug.cgi?id=921509 - self.log.info( - "Can't trigger Breakpad, process no longer exists") - return + try: + minidump_path = os.path.join(self.profile.profile, + 'minidumps') + mozcrash.kill_and_get_minidump(processPID, minidump_path) + except OSError: + # https://bugzilla.mozilla.org/show_bug.cgi?id=921509 + self.log.info( + "Can't trigger Breakpad, process no longer exists") + return self.log.info("Can't trigger Breakpad, just killing process") killPid(processPID, self.log)