update outputpath
This commit is contained in:
parent
b7b34c1b8e
commit
69fa37aa95
|
@ -3,7 +3,11 @@
|
||||||
import re
|
import re
|
||||||
import sys, getopt
|
import sys, getopt
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
|
PATH = lambda p: os.path.abspath(
|
||||||
|
os.path.join(os.path.dirname(__file__), p)
|
||||||
|
)
|
||||||
|
|
||||||
def getUUID(text):
|
def getUUID(text):
|
||||||
uuid = re.findall('<(.*)>', text)[0].upper()
|
uuid = re.findall('<(.*)>', text)[0].upper()
|
||||||
|
@ -24,8 +28,11 @@ def analyzeCrashLog(inputfile, outputfile):
|
||||||
|
|
||||||
path = "'" + path + "'"
|
path = "'" + path + "'"
|
||||||
print(path)
|
print(path)
|
||||||
|
analysisPath = PATH("../iOSCrashAnalysis/")
|
||||||
|
outname = os.path.splitext(inputfile)[0]
|
||||||
|
|
||||||
ttt = subprocess.getoutput(
|
ttt = subprocess.getoutput(
|
||||||
'/Users/zhulixin/Desktop/CrashAnalysis/symbolicatecrash ' + inputfile + ' -d ' + path + ' -o XiaoYing-IOS-Crash.crash')
|
analysisPath + '/symbolicatecrash ' + inputfile + ' -d ' + path + ' -o ' + outname + '.crash')
|
||||||
print(ttt)
|
print(ttt)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,16 @@ class FileFilt:
|
||||||
self.fileList.append(newDir)
|
self.fileList.append(newDir)
|
||||||
self.counter += 1
|
self.counter += 1
|
||||||
|
|
||||||
|
def DelFolder(self, delDir):
|
||||||
|
delList = os.listdir(delDir)
|
||||||
|
for f in delList:
|
||||||
|
filePath = os.path.join(delDir, f)
|
||||||
|
if os.path.isfile(filePath):
|
||||||
|
os.remove(filePath)
|
||||||
|
print(filePath + " was removed!")
|
||||||
|
elif os.path.isdir(filePath):
|
||||||
|
shutil.rmtree(filePath, True)
|
||||||
|
print("Directory: " + filePath + " was removed!")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
pass
|
pass
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -391,17 +391,6 @@ sub getSymbolPathAndArchFor {
|
||||||
# derive a few more parameters...
|
# derive a few more parameters...
|
||||||
my $bin = ($path =~ /^.*?([^\/]+)$/)[0]; # basename
|
my $bin = ($path =~ /^.*?([^\/]+)$/)[0]; # basename
|
||||||
|
|
||||||
# Look in the search paths (e.g. the device support directories)
|
|
||||||
print STDERR "-- [$uuid] CHECK (device support)\n" if $opt_verbose;
|
|
||||||
for my $func ( \&getSymbolPathAndArchFor_searchpaths, ) {
|
|
||||||
my ($out_path, $arch) = &$func($bin,$path,$build,$uuid,@extra_search_paths);
|
|
||||||
if ( defined($out_path) && length($out_path) && defined($arch) && length($arch) ) {
|
|
||||||
print STDERR "-- [$uuid] MATCH (device support): $out_path ($arch)\n" if $opt_verbose;
|
|
||||||
return ($out_path, $arch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print STDERR "-- [$uuid] NO MATCH (device support)\n\n" if $opt_verbose;
|
|
||||||
|
|
||||||
# Look in any of the manually-passed dSYMs
|
# Look in any of the manually-passed dSYMs
|
||||||
if( @opt_dsyms ) {
|
if( @opt_dsyms ) {
|
||||||
print STDERR "-- [$uuid] CHECK (manual)\n" if $opt_verbose;
|
print STDERR "-- [$uuid] CHECK (manual)\n" if $opt_verbose;
|
||||||
|
@ -428,6 +417,17 @@ sub getSymbolPathAndArchFor {
|
||||||
print STDERR "-- [$uuid] NO MATCH (uuid cache)\n\n" if $opt_verbose;
|
print STDERR "-- [$uuid] NO MATCH (uuid cache)\n\n" if $opt_verbose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Look in the search paths (e.g. the device support directories)
|
||||||
|
print STDERR "-- [$uuid] CHECK (device support)\n" if $opt_verbose;
|
||||||
|
for my $func ( \&getSymbolPathAndArchFor_searchpaths, ) {
|
||||||
|
my ($out_path, $arch) = &$func($bin,$path,$build,$uuid,@extra_search_paths);
|
||||||
|
if ( defined($out_path) && length($out_path) && defined($arch) && length($arch) ) {
|
||||||
|
print STDERR "-- [$uuid] MATCH (device support): $out_path ($arch)\n" if $opt_verbose;
|
||||||
|
return ($out_path, $arch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print STDERR "-- [$uuid] NO MATCH (device support)\n\n" if $opt_verbose;
|
||||||
|
|
||||||
# Ask spotlight
|
# Ask spotlight
|
||||||
if( $opt_spotlight ) {
|
if( $opt_spotlight ) {
|
||||||
print STDERR "-- [$uuid] CHECK (spotlight)\n" if $opt_verbose;
|
print STDERR "-- [$uuid] CHECK (spotlight)\n" if $opt_verbose;
|
||||||
|
@ -513,7 +513,7 @@ sub parse_threads {
|
||||||
my ($log_ref,%arg) = @_;
|
my ($log_ref,%arg) = @_;
|
||||||
|
|
||||||
my $nocolon = 0;
|
my $nocolon = 0;
|
||||||
my $stack_delimeter = 'Thread\s+\d+\s?(Highlighted|Crashed|Attributed)?'; # Crash reports
|
my $stack_delimeter = 'Thread\s+\d+\s?(Highlighted|Crashed)?'; # Crash reports
|
||||||
|
|
||||||
if ($arg{event_type}) {
|
if ($arg{event_type}) {
|
||||||
# Spindump reports
|
# Spindump reports
|
||||||
|
|
Loading…
Reference in New Issue