diff options
-rw-r--r-- | autobuild/icons/build-ant.png | bin | 0 -> 766 bytes | |||
-rw-r--r-- | autobuild/icons/build-cmake.png | bin | 0 -> 795 bytes | |||
-rw-r--r-- | autobuild/icons/build-maven.png | bin | 0 -> 772 bytes | |||
-rw-r--r-- | autobuild/icons/build-scons.png | bin | 0 -> 585 bytes | |||
-rw-r--r-- | autobuild/icons/lang-dotnet.png | bin | 0 -> 340 bytes | |||
-rw-r--r-- | autobuild/icons/lang-java.png | bin | 0 -> 510 bytes | |||
-rw-r--r-- | autobuild/icons/lang-lua.png | bin | 0 -> 878 bytes | |||
-rw-r--r-- | autobuild/icons/lang-pascal.png | bin | 0 -> 777 bytes | |||
-rw-r--r-- | autobuild/icons/lang-perl.png | bin | 0 -> 773 bytes | |||
-rw-r--r-- | autobuild/icons/lang-php.png | bin | 0 -> 495 bytes | |||
-rw-r--r-- | autobuild/icons/lang-python.png | bin | 0 -> 745 bytes | |||
-rw-r--r-- | autobuild/icons/lang-ruby.png | bin | 0 -> 933 bytes | |||
-rw-r--r-- | autobuild/results.php | 44 |
13 files changed, 39 insertions, 5 deletions
diff --git a/autobuild/icons/build-ant.png b/autobuild/icons/build-ant.png Binary files differnew file mode 100644 index 0000000..0b1c81e --- /dev/null +++ b/autobuild/icons/build-ant.png diff --git a/autobuild/icons/build-cmake.png b/autobuild/icons/build-cmake.png Binary files differnew file mode 100644 index 0000000..9edf330 --- /dev/null +++ b/autobuild/icons/build-cmake.png diff --git a/autobuild/icons/build-maven.png b/autobuild/icons/build-maven.png Binary files differnew file mode 100644 index 0000000..11a2d82 --- /dev/null +++ b/autobuild/icons/build-maven.png diff --git a/autobuild/icons/build-scons.png b/autobuild/icons/build-scons.png Binary files differnew file mode 100644 index 0000000..a38d57c --- /dev/null +++ b/autobuild/icons/build-scons.png diff --git a/autobuild/icons/lang-dotnet.png b/autobuild/icons/lang-dotnet.png Binary files differnew file mode 100644 index 0000000..676b0c0 --- /dev/null +++ b/autobuild/icons/lang-dotnet.png diff --git a/autobuild/icons/lang-java.png b/autobuild/icons/lang-java.png Binary files differnew file mode 100644 index 0000000..94ee2c4 --- /dev/null +++ b/autobuild/icons/lang-java.png diff --git a/autobuild/icons/lang-lua.png b/autobuild/icons/lang-lua.png Binary files differnew file mode 100644 index 0000000..12b4c83 --- /dev/null +++ b/autobuild/icons/lang-lua.png diff --git a/autobuild/icons/lang-pascal.png b/autobuild/icons/lang-pascal.png Binary files differnew file mode 100644 index 0000000..e6dc736 --- /dev/null +++ b/autobuild/icons/lang-pascal.png diff --git a/autobuild/icons/lang-perl.png b/autobuild/icons/lang-perl.png Binary files differnew file mode 100644 index 0000000..b1a12bd --- /dev/null +++ b/autobuild/icons/lang-perl.png diff --git a/autobuild/icons/lang-php.png b/autobuild/icons/lang-php.png Binary files differnew file mode 100644 index 0000000..60f7c47 --- /dev/null +++ b/autobuild/icons/lang-php.png diff --git a/autobuild/icons/lang-python.png b/autobuild/icons/lang-python.png Binary files differnew file mode 100644 index 0000000..7e600a7 --- /dev/null +++ b/autobuild/icons/lang-python.png diff --git a/autobuild/icons/lang-ruby.png b/autobuild/icons/lang-ruby.png Binary files differnew file mode 100644 index 0000000..7b1daa2 --- /dev/null +++ b/autobuild/icons/lang-ruby.png diff --git a/autobuild/results.php b/autobuild/results.php index e3ab4d1..9a81622 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -40,6 +40,7 @@ foreach ($runs as $r) { } $prev = $r; } +$runepoc = strtotime($run); $packages = Array(); if ($handle = opendir('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/')) { @@ -192,10 +193,15 @@ function is_flaky($history) { return $num_change >= 4; } -function get_build_history($package) { +function get_package_id($package) { + global $db; + return $db->querySingle("SELECT Id FROM Packages WHERE Name = '$package'"); +} + +function get_build_history($package_id) { global $db; - $package_id = $db->querySingle("SELECT Id FROM Packages WHERE Name = '$package'"); if ($package_id) { + # TODO: optimize by retrieving Runs.Id once at the start $result = $db->query("SELECT ResultValues.Name FROM Runs, Results, ResultValues WHERE Runs.Id = Results.Run AND Results.Result = ResultValues.Id AND Results.Package = '$package_id' ORDER BY Start DESC LIMIT 10"); if ($result) { $build_stats = Array(); @@ -208,6 +214,15 @@ function get_build_history($package) { return false; } +function get_package_attributes($package_id) { + global $db, $runepoc; + if ($package_id) { + # TODO: optimize by retrieving Runs.Id once at the start + $attributes = $db->querySingle("SELECT Attr FROM Attributes, Runs WHERE Runs.Id = Attributes.Run AND Runs.Start = $runepoc AND Attributes.Package = '$package_id';"); + } + return $attributes; +} + echo "<form><select name='run' onChange='document.location.href=\"".$_SERVER["PHP_SELF"]."?run=\"+this.form.run.value'>"; foreach ($runs as $r) { $in_progress = ($r > $latest) ? ' (in progress)' : ''; @@ -234,15 +249,34 @@ foreach ($failure as $rpm => $error) { if (file_exists("icons/error-$error.png")) { $error_html = "<img src='icons/error-$error.png' title='$error'/>"; } - $history = get_build_history($parsed['package']); + $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' />"; } + $language_link = ""; + if (!$fixed[$rpm]) { + $attributes = get_package_attributes($packageid); + if ($attributes) { + # Attributes are space separated words of the form "lang_php" + foreach (explode(" ", $attributes) as $attr) { + $attrname = ucfirst(explode("_", $attr)[1]); + $icon_fn = "icons/" . str_replace("_", "-", $attr) . ".png"; + if (file_exists($icon_fn)) { + $language_link = $language_link . " <img src='$icon_fn' " . + "title='$attrname dependency' />"; + } else { + $language_link = $language_link . " [$attrname dep]"; + } + } + } + } if (file_exists("$base_dir/$rpm/")) { - echo "<li>$error_html <a href='$base_dir/$rpm/'>$rpm</a> $status_html $history_link</li>\n"; + echo "<li>$error_html <a href='$base_dir/$rpm/'>$rpm</a>"; } else { - echo "<li>$error_html $rpm $status_html $history_link</li>\n"; + echo "<li>$error_html $rpm"; } + echo " $status_html $history_link$language_link</li>\n"; } $db->close(); ?> |