diff options
Diffstat (limited to 'BuildTools/CrashReportAnalysis')
| -rw-r--r-- | BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py b/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py index dada920..19e5f87 100644 --- a/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py +++ b/BuildTools/CrashReportAnalysis/WindowsMinidumpAnalyse.py @@ -1,35 +1,35 @@ #!/usr/bin/env python # Note # ---- # This script requires: # - cdb, the Windows command line debugger installed and available in PATH. -# - the SWIFT_DIST environment variable set to a locatioon that contains msi and pdb.gz files. +# - the SWIFT_DIST environment variable set to a location that contains msi and pdb.gz files. import sys from subprocess import call from subprocess import Popen, PIPE import ntpath import shutil import re import urllib2 import os import gzip import time swiftWindowBuildsPathPrefix = os.getenv("SWIFT_DIST") if swiftWindowBuildsPathPrefix == None : - print "Please set the SWIFT_DIST environment variable to a location containing msi and pdb.gz files." + print("Please set the SWIFT_DIST environment variable to a location containing msi and pdb.gz files.") sys.exit(1) if len(sys.argv) != 3: - print "Usage: python WindowsMinidumpAnalyse.py VERSION MINIDUMP_FILE" + print("Usage: python WindowsMinidumpAnalyse.py VERSION MINIDUMP_FILE") sys.exit(1) version = sys.argv[1] minidump_file = sys.argv[2] minidump_filename = ntpath.basename(minidump_file) minidump_fullpath = os.path.abspath(minidump_file) humantext_fullpath = os.path.splitext(minidump_fullpath)[0]+".txt" symbol_cache_path = os.path.join(os.getenv("TEMP"), "\symbols") working_folder = "tmp-crash-{0}".format(minidump_filename) @@ -87,19 +87,19 @@ def printHumanReadableReport(): cdbFullCommand = ["cdb", "-i", os.getcwd(), "-y", symbolPath, "-z", minidump_filename, "-srcpath", oldDir, "-logo", humantext_fullpath, "-c", cdbCommand ] print("Run command: " + str(cdbFullCommand)) call(cdbFullCommand) # for testing, delete the old folder try: shutil.rmtree(working_folder) except: - print "" + print("") # clone local git repository into dedicated directory call(["git", "clone", ".", working_folder], shell=True) # git version from swift version match = re.match( r"(.*)-dev(\d+)", version) if match: basetag = match.group(1) commits = int(match.group(2)) @@ -114,19 +114,19 @@ else: exit_code = process.wait() commit = output.strip() assert(len(commit) > 0) # Create symbol cache directory if not os.path.exists(symbol_cache_path): os.makedirs(symbol_cache_path) -#print "Checking out commit {0}.".format(commit) +#print("Checking out commit {0}.".format(commit)) call(["git", "-C", working_folder, "checkout", commit]) os.chdir(working_folder) downloadInstaller(version) downloadDebugSymbols(version) unpackInstaller(version) unpackDebugSymbols(version) copyMinidump(minidump_fullpath) |
Swift