Changeset 77633 in webkit


Ignore:
Timestamp:
Feb 4, 2011 9:07:47 AM (13 years ago)
Author:
Adam Roben
Message:

Link to Mac crash logs from results.html

Fixes <http://webkit.org/b/14861> run-webkit-tests should link to Mac crash logs in
results.html

Reviewed by David Kilzer.

  • Scripts/old-run-webkit-tests:

(captureSavedCrashLog): Added a case for Apple's Mac port. We get the crash log out of
~/Library/Logs/CrashReporter, and wait for ReportCrash to exit before trying to get the log.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r77611 r77633  
     12011-02-04  Adam Roben  <aroben@apple.com>
     2
     3        Link to Mac crash logs from results.html
     4
     5        Fixes <http://webkit.org/b/14861> run-webkit-tests should link to Mac crash logs in
     6        results.html
     7
     8        Reviewed by David Kilzer.
     9
     10        * Scripts/old-run-webkit-tests:
     11        (captureSavedCrashLog): Added a case for Apple's Mac port. We get the crash log out of
     12        ~/Library/Logs/CrashReporter, and wait for ReportCrash to exit before trying to get the log.
     13
    1142011-02-03  Maciej Stachowiak  <mjs@apple.com>
    215
  • trunk/Tools/Scripts/old-run-webkit-tests

    r77571 r77633  
    17521752
    17531753    my $crashLog;
     1754
     1755    my $glob;
    17541756    if (isCygwin()) {
    1755         # We assume that the newest crash log in $testResultsDirectory is the one that corresponds to the crash that just occurred.
    1756         my $newestCrashLog = findNewestFileMatchingGlob(File::Spec->catfile($testResultsDirectory, $windowsCrashLogFilePrefix . "*.txt"));
    1757 
     1757        $glob = File::Spec->catfile($testResultsDirectory, $windowsCrashLogFilePrefix . "*.txt");
     1758    } elsif (isAppleMacWebKit()) {
     1759        $glob = File::Spec->catfile("~", "Library", "Logs", "CrashReporter", $dumpToolName . "_*.crash");
     1760
     1761        # Even though the dump tool has exited, CrashReporter might still be running. We need to
     1762        # wait for it to exit to ensure it has saved its crash log to disk. For simplicitly, we'll
     1763        # assume that the ReportCrash process with the highest PID is the one we want.
     1764        if (my @reportCrashPIDs = sort map { /^\s*(\d+)/; $1 } grep { /ReportCrash/ } `/bin/ps x`) {
     1765            my $reportCrashPID = $reportCrashPIDs[$#reportCrashPIDs];
     1766            # We use kill instead of waitpid because ReportCrash is not one of our child processes.
     1767            usleep(250000) while kill(0, $reportCrashPID) > 0;
     1768        }
     1769    }
     1770
     1771    # We assume that the newest crash log in matching the glob is the one that corresponds to the crash that just occurred.
     1772    if (my $newestCrashLog = findNewestFileMatchingGlob($glob)) {
    17581773        # The crash log must have been created after this script started running.
    17591774        $crashLog = $newestCrashLog if -M $newestCrashLog < 0;
    17601775    }
     1776
    17611777    return unless $crashLog;
    17621778
Note: See TracChangeset for help on using the changeset viewer.