bug 540627 - provide an environment variable to save minidumps from test runs. r=bsmedberg

--HG--
extra : rebase_source : d53ac17a06eb938e1fcd9a59e409b3467c04fed9
This commit is contained in:
Ted Mielczarek 2010-02-03 14:15:17 -05:00
Родитель 4f49aefd7d
Коммит 1451ee2e6c
1 изменённых файлов: 8 добавлений и 2 удалений

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

@ -36,7 +36,7 @@
#
# ***** END LICENSE BLOCK ***** */
import glob, logging, os, subprocess, sys
import glob, logging, os, shutil, subprocess, sys
import re
__all__ = [
@ -118,6 +118,12 @@ def checkForCrashes(dumpDir, symbolsPath, testName=None):
else:
if not os.path.exists(stackwalkPath):
print "MINIDUMP_STACKWALK binary not found: %s" % stackwalkPath
dumpSavePath = os.environ.get('MINIDUMP_SAVE_PATH', None)
if dumpSavePath:
shutil.move(d, dumpSavePath)
print "Saved dump as %s" % os.path.join(dumpSavePath,
os.path.basename(d))
else:
os.remove(d)
extra = os.path.splitext(d)[0] + ".extra"
if os.path.exists(extra):