From 3e7830cb82c8244c6b7c5793d9c623a763f09593 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 23 May 2014 21:19:36 +0000 Subject: Fix fixed packages detection and hide successful packages --- autobuild/results.php | 65 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 56 insertions(+), 9 deletions(-) diff --git a/autobuild/results.php b/autobuild/results.php index d7f0660..9172a57 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -76,12 +76,26 @@ if (!file_exists($status_name)) { exit; } +$start_time = 0; +if (file_exists("$base_dir/VERSION")) { +#Mageia 5 Devel-i586-Download 20140311 15:50 +#Mageia 5 Devel-x86_64-Download 20140311 15:50 + $version = file_get_contents("$base_dir/VERSION"); + preg_match('/ (\d{8} \d{2}:\d{2})$/', $version, $matches); + $start_time = strtotime($matches[1]); +} $status_file = fopen($status_name, "r"); while (!feof($status_file)) { $line = fgets($status_file); if (preg_match("/^(.*): (.*)$/", $line, $matches)) { $rpm = $matches[1]; $status = $matches[2]; + if ($start_time == 0) { + $build_stat = stat("$base_dir/$rpm"); + if ($build_stat['mtime']) { + $start_time = $build_stat['mtime']; + } + } if ($status == "ok") { array_push($success, $rpm); } elseif ($status != "unknown" && $status != "not_on_this_arch"){ @@ -96,7 +110,7 @@ while (!feof($status_file)) { } else { $build_stat = stat("$base_dir/$rpm"); $pkg_stat = stat('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/'.$packages[$package]); - if ($pkg_stat['mtime'] > $build_stat['mtime']) { + if (file_exists("$base_dir/$rpm") && $pkg_stat['mtime'] > $start_time) { $fixed[$rpm] = 1; } } @@ -117,9 +131,38 @@ $succes_percent = round($nb_success*1000/$nb_tried)/10; $estimated_percent = round(($nb_success+$nb_fixed)*1000/($nb_tried-$nb_removed))/10; echo "$succes_percent% Success\n"; -echo "\n"; - -echo "
"; +?> + + + + + +
+
\n"; echo "

$succes_percent% Success

\n"; echo "$nb_fixed packages have been fixed since this run and $nb_removed have been removed.
If no new package was broken, success rate next time should be $estimated_percent%.
\n"; -echo "

Failed builds ($nb_failed/$nb_tried):

    "; +echo "

    Failed builds ($nb_failed/$nb_tried)

      "; foreach ($failure as $rpm => $error) { $parsed = parse_package($rpm); @@ -152,9 +195,13 @@ foreach ($failure as $rpm => $error) { echo "
    • $error_html $rpm $status_html $history_link
    • \n"; } } - -echo "

    Successful builds ($nb_success/$nb_tried):

      "; - +?> +
    +

    + +

    + +
-- cgit v1.2.1