summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autobuild/results.php91
1 files changed, 55 insertions, 36 deletions
diff --git a/autobuild/results.php b/autobuild/results.php
index a6bfe21..0fc9807 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -1,5 +1,8 @@
<html>
<head>
+ <link rel="author" href="http://www.mageia.org/">
+ <link rel="icon" type="image/png" href="../themes/mageia/favicon.png">
+ <link rel="stylesheet" href="../themes/mageia/style.css">
<?php
function parse_package($rpm) {
@@ -156,6 +159,15 @@ echo "<title>$succes_percent% Success</title>\n";
.expand-arrow {
text-decoration: none;
}
+table.failureTable {
+ background-color: #f7f7f7;
+}
+table.failureTable tr:nth-child(even) {
+ background: rgba(50,160,200, 0.1);
+}
+table.failureTable thead th {
+ font-weight: bold;
+}
</style>
<script language='javascript'>
function toggle(titleid, contentid){
@@ -167,6 +179,7 @@ function toggle(titleid, contentid){
else
e.style.display = 'block';
}
+
</script>
<meta charset="utf-8">
</head>
@@ -230,73 +243,79 @@ foreach ($runs as $r) {
echo "<option value='$r'$selected>$r$in_progress</option>";
}
echo "</select></form></div>\n";
-echo "<h1>$succes_percent% Success</h1>\n";
+echo "<header id=\"mgnavt\"><h1>$succes_percent% Success</h1></header>\n";
echo "$nb_fixed packages have been fixed since this run and $nb_removed have been removed.<br/> If no new package was broken, success rate next time should be $estimated_percent%.<br/>\n";
-echo "<div style='float:left;'><h1>Failed builds ($nb_failed/$nb_tried)</h1><ul style='list-style:none;'>";
-
+echo "<h1>Failed builds ($nb_failed/$nb_tried)</h1>\n";
+echo "<table class=\"failureTable\" >\n";
+echo "<tr><th></th><th>Status</th><th>Failure type</th><th>Build step</th><th></th><th>Languages</th><th>Detected errors</th></tr>\n";
foreach ($failure as $rpm => $error) {
$parsed = parse_package($rpm);
- $history_link = '<a href="history.php?package='.$parsed['package'].'">[h]</a>';
+ $history_link = '<a href="history.php?package='.$parsed['package'].'">History</a>';
$status_html = "";
if ($fixed[$rpm]) {
- $status_html = " <img src='icons/state-fixed.png' title='Fixed!' />";
+ $status_html = " <img src='icons/state-fixed.png' title='Fixed!' /> Fixed";
} elseif ($removed[$rpm]) {
- $status_html = " <img src='icons/state-removed.png' title='Removed' />";
+ $status_html = " <img src='icons/state-removed.png' title='Removed' /> Removed";
} elseif ($broken[$rpm]) {
- $status_html = " <img src='icons/state-new.png' title='New!' />";
+ $status_html = " <img src='icons/state-new.png' title='New!' /> New";
}
$error_html = $error;
if (file_exists("icons/error-$error.png")) {
- $error_html = "<img src='icons/error-$error.png' title='$error'/>";
+ $error_html = "<img src='icons/error-$error.png' title='$error'/> $error";
}
$packageid = get_package_id($parsed['package']);
$history = get_build_history($packageid);
if (is_flaky($history)) {
$history_link = $history_link . " <img src='icons/warning-flaky.png' title='Flaky build' />";
}
- $attr_link = "";
- if (!$fixed[$rpm]) {
- $attributes = get_package_attributes($packageid);
- if ($attributes) {
- # Attributes are space separated words of the form "TYPE_SPECIFIER", e.g., "lang_php"
- # Types are currently build (use of a particular build system),
- # lang (use of a programming language) or err (a common build error).
- foreach (explode(" ", $attributes) as $attr) {
- if (empty($attr)) {
- continue;
- }
- $attrname = ucfirst(explode("_", $attr)[1]);
+ $langs = "";
+ $errors = "";
+ $stage = "";
+ $attributes = get_package_attributes($packageid);
+ if ($attributes) {
+ # Attributes are space separated words of the form "TYPE_SPECIFIER", e.g., "lang_php"
+ # Types are currently build (use of a particular build system),
+ # lang (use of a programming language) or err (a common build error).
+ foreach (explode(" ", $attributes) as $attr) {
+ if (empty($attr)) {
+ continue;
+ }
+ $attrname = explode("_", $attr)[1];
+ if (substr($attr, 0, 5) === "lang_") {
+ $lang = ucfirst($attrname);
$icon_fn = "icons/" . str_replace("_", "-", $attr) . ".png";
if (file_exists($icon_fn)) {
- $attr_link = $attr_link . " <img src='$icon_fn' " .
- "title='Uses $attrname' />";
+ $langs = $langs . " <img src='$icon_fn' title='Uses $lang' />";
} else {
- if (substr($attr, 0, 4) === "err_") {
- # TODO: create link into wiki with information about these errors
- $attr_link = $attr_link . " [Common Error: $attrname]";
- } else if (substr($attr, 0, 6) === "stage_") {
- if ($attr != "stage_build" && $attr != "stage_nobuild") {
- $lattr = strtolower($attrname);
- $attr_link = $attr_link . " [%$lattr failure]";
- }
+ $langs = $langs . " $lang";
+ }
+ } elseif (substr($attr, 0, 4) === "err_") {
+ # TODO: create link into wiki with information about these errors
+ $errors = "$errors $attrname";
+ } elseif (substr($attr, 0, 6) === "stage_") {
+ if ($attrname != 'nobuild') {
+ if ($attrname == 'preprep') {
+ $stage = 'Before %prep';
} else {
- $attr_link = $attr_link . " [$attr]";
+ $stage = "%$attrname";
}
}
}
}
}
+ echo "<tr>";
if (file_exists("$base_dir/$rpm/")) {
- echo "<li>$error_html <a href='$base_dir/$rpm/'>$rpm</a>";
+ echo "<td><a href='$base_dir/$rpm/'>$rpm</a></td>";
} else {
- echo "<li>$error_html $rpm";
+ echo "<td>$rpm</td>";
}
- echo " $status_html $history_link$attr_link</li>\n";
+ echo "<td>$status_html</td><td>$error_html</td><td>$stage</td><td>$history_link</td><td>$langs</td><td>$errors</td></tr>\n";
}
$db->close();
?>
-</ul></div>
-<div style='float:right; width:50%'><h1><a class='expand-arrow' id='success-title' href='javascript:toggle("success-title","success-list");'>
+</table>
+</div>
+<div><h1><a class='expand-arrow' id='success-title' href='javascript:toggle("success-title","success-list");'>
<?php echo "Successful builds ($nb_success/$nb_tried)" ?>
</a></h1>
<div id="success-list" style="display:none"><ul>