Exemplo n.º 1
0
 public function generate($dbLog)
 {
     $summary = $this->logParser->getExcerpt(true);
     $log = $this->getLog();
     $result = $this->generateHTML($summary, $log);
     GzipUtils::writeToDb($dbLog, $result);
 }
Exemplo n.º 2
0
 public function generate($log)
 {
     $file = GzipUtils::getLines($this->rawSummary);
     $lines = array();
     foreach ($file as $line) {
         $this->processLine($lines, $line);
     }
     if ($this->hasLeak) {
         $lines[] = "<a href=\"php/getLeakAnalysis.php?id=" . $_GET["id"] . "\" target=\"_blank\">Analyze the leak.</a>";
     }
     GzipUtils::writeToDb($log, implode("", $lines));
 }
Exemplo n.º 3
0
<?php

/* -*- Mode: PHP; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=2 et tw=80 : */
require_once 'inc/LogParser.php';
require_once 'inc/GeneralErrorFilter.php';
require_once 'inc/ShortLogGenerator.php';
require_once 'inc/FullLogGenerator.php';
require_once 'inc/GzipUtils.php';
require_once 'inc/RunForLog.php';
require_once 'inc/Communication.php';
Headers::send(Headers::ALLOW_CROSS_ORIGIN);
$run = getRequestedRun();
$logParser = new LogParser($run, new GeneralErrorFilter());
try {
    // Create the plain text summary too, since we need to parse the
    // log for errors anyway.
    $logParser->ensureExcerptExists();
    $viewFullLog = isset($_GET['full']) && $_GET['full'] == 1;
    $logGenerator = $viewFullLog ? new FullLogGenerator($logParser, $run) : new ShortLogGenerator($logParser, $run);
    $parsedLog = $logGenerator->ensureLogExists();
    GzipUtils::passThru($parsedLog, "text/html");
} catch (Exception $e) {
    die($e->getMessage());
}
Exemplo n.º 4
0
 public static function getLines($run)
 {
     $log = array("_id" => $run['_id'], "type" => "raw");
     ParallelLogGenerating::ensureLogExists($log, new self($run['log']));
     return GzipUtils::getLines($log);
 }
Exemplo n.º 5
0
<?php

/* -*- Mode: PHP; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=2 et tw=80 : */
require_once 'inc/LeakAnalyzer.php';
require_once 'inc/GzipUtils.php';
require_once 'inc/RunForLog.php';
require_once 'inc/Communication.php';
Headers::send(Headers::ALLOW_CROSS_ORIGIN);
$run = getRequestedRun();
try {
    $analyzer = new LeakAnalyzer($run);
    $log = $analyzer->ensureLogExists();
    GzipUtils::passThru($log, "text/html");
} catch (Exception $e) {
    die($e->getMessage());
}
Exemplo n.º 6
0
 public function generate($log)
 {
     GzipUtils::writeToDb($log, $this->getExcerpt());
 }
Exemplo n.º 7
0
require_once 'inc/Communication.php';
Headers::send(Headers::ALLOW_CROSS_ORIGIN);
$type = isset($_GET["type"]) ? $_GET["type"] : "plaintext";
$run = getRequestedRun();
try {
    if ($type == "reftest") {
        $logParser = new LogParser($run, new ReftestFailureFilter());
        $reftestExcerpt = $logParser->ensureExcerptExists();
        GzipUtils::passThru($reftestExcerpt, 'text/plain');
    } else {
        if ($type == "tinderbox_print") {
            $logParser = new LogParser($run, new TinderboxPrintFilter());
            $tinderboxPrintExcerpt = $logParser->ensureExcerptExists();
            GzipUtils::passThru($tinderboxPrintExcerpt, 'text/plain');
        } else {
            $logParser = new LogParser($run, new GeneralErrorFilter());
            $rawErrorSummary = $logParser->ensureExcerptExists();
            if ($type != "annotated") {
                GzipUtils::passThru($rawErrorSummary, 'text/plain');
            } else {
                date_default_timezone_set('America/Los_Angeles');
                $logDescription = $run['buildername'] . ' on ' . date("Y-m-d H:i:s", $run['starttime']);
                $annotatedSummaryGenerator = new AnnotatedSummaryGenerator($rawErrorSummary, $logDescription);
                $annotatedSummary = $annotatedSummaryGenerator->ensureAnnotatedSummaryExists();
                GzipUtils::passThru($annotatedSummary, 'text/plain');
            }
        }
    }
} catch (Exception $e) {
    die("Log not available.");
}