X-Git-Url: https://git.webkit.org/?p=WebKit.git;a=blobdiff_plain;f=Tools%2FScripts%2Fold-run-webkit-tests;h=c56cb1c21b2a90199271a94998677e2f190779da;hp=6c277d7bd10d04e691c5a605d75b7e772c42e5bf;hb=057ee5315a2ae7ca056c2ad475ca4a3abe8e823e;hpb=f3eefab86206a735feee121ed02b994171366f1c diff --git a/Tools/Scripts/old-run-webkit-tests b/Tools/Scripts/old-run-webkit-tests index 6c277d7bd10d..c56cb1c21b2a 100755 --- a/Tools/Scripts/old-run-webkit-tests +++ b/Tools/Scripts/old-run-webkit-tests @@ -1969,31 +1969,57 @@ sub crashLocation($) { my ($base) = @_; - return unless isCygwin(); - my $crashLogFile = File::Spec->catfile($testResultsDirectory, "$base-$crashLogTag.txt"); - # We're looking for the following text: - # - # FOLLOWUP_IP: - # module!function+offset [file:line] - # - # The second contains the function that crashed (or the function that ended up jumping to a bad - # address, as in the case of a null function pointer). + if (isCygwin()) { + # We're looking for the following text: + # + # FOLLOWUP_IP: + # module!function+offset [file:line] + # + # The second contains the function that crashed (or the function that ended up jumping to a bad + # address, as in the case of a null function pointer). + + open LOG, "<", $crashLogFile or return; + while (my $line = ) { + last if $line =~ /^FOLLOWUP_IP:/; + } + my $desiredLine = ; + close LOG; + + return unless $desiredLine; - open LOG, "<", $crashLogFile or return; - while (my $line = ) { - last if $line =~ /^FOLLOWUP_IP:/; + # Just take everything up to the first space (which is where the file/line information should + # start). + $desiredLine =~ /^(\S+)/; + return $1; } - my $desiredLine = ; - close LOG; - - return unless $desiredLine; - # Just take everything up to the first space (which is where the file/line information should - # start). - $desiredLine =~ /^(\S+)/; - return $1; + if (isAppleMacWebKit()) { + # We're looking for the following text: + # + # Thread M Crashed: + # N module address function + offset (file:line) + # + # Some lines might have a module of "???" if we've jumped to a bad address. We should skip + # past those. + + open LOG, "<", $crashLogFile or return; + while (my $line = ) { + last if $line =~ /^Thread \d+ Crashed:/; + } + my $location; + while (my $line = ) { + $line =~ /^\d+\s+(\S+)\s+\S+ (.* \+ \d+)/ or next; + my $module = $1; + my $functionAndOffset = $2; + next if $module eq "???"; + $location = "$module: $functionAndOffset"; + last; + } + close LOG; + return $location; + } } sub linksForErrorTest