/[soft]/build_system/web/autobuild/results.php
ViewVC logotype

Diff of /build_system/web/autobuild/results.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6728 by pterjan, Mon Dec 10 21:59:10 2012 UTC revision 6729 by pterjan, Tue Dec 11 23:03:12 2012 UTC
# Line 2  Line 2 
2  <head>  <head>
3  <?php  <?php
4    
5  $success = Array();  $runs = Array();
6  $failure = Array();  $handle = opendir('cauldron/x86_64/core/');
7  $fixed = Array();  while (false !== ($entry = readdir($handle))) {
8  $removed = Array();          if (preg_match("/^....-..-..$/", $entry, $matches)) {
9  $packages = Array();                  array_push($runs, $matches[0]);
10            }
11    }
12    closedir($handle);
13    sort($runs);
14    
15  $run = $_GET['run'];  $run = $_GET['run'];
16  if (!$run) {  if (!$run) {
17          $run = "latest";          $run = readlink("cauldron/x86_64/core/latest");
18  }  }
 $base_dir = "cauldron/x86_64/core/$run";  
   
 $status_name = "$base_dir/status.core.log";  
 $status_file = fopen($status_name, "r");  
19    
20    foreach ($runs as $r) {
21            if ($r==$run) {
22                    break;
23            }
24            $prev = $r;
25    }
26    $packages = Array();
27  if ($handle = opendir('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/')) {  if ($handle = opendir('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/')) {
28          while (false !== ($entry = readdir($handle))) {          while (false !== ($entry = readdir($handle))) {
29                  if (preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $entry, $matches)) {                  if (preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $entry, $matches)) {
# Line 26  if ($handle = opendir('/distrib/bootstra Line 33  if ($handle = opendir('/distrib/bootstra
33          closedir($handle);          closedir($handle);
34  }  }
35    
36    $prev_failure = Array();
37    if ($prev) {
38            $base_dir = "cauldron/x86_64/core/$prev";
39            $status_name = "$base_dir/status.core.log";
40            $status_file = fopen($status_name, "r");
41            while (!feof($status_file)) {
42                    $line = fgets($status_file);
43                    if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
44                            $rpm = $matches[1];
45                            $status = $matches[2];
46                            if ($status != "ok" && $status != "unknown" && $status != "not_on_this_arch") {
47                                    $prev_failure[$rpm] = 1;
48                            }
49                    }
50            }
51            fclose($status_file);
52    }
53    
54    $success = Array();
55    $failure = Array();
56    $fixed = Array();
57    $removed = Array();
58    
59    $base_dir = "cauldron/x86_64/core/$run";
60    
61    
62    $status_name = "$base_dir/status.core.log";
63    if (!file_exists($status_name)) {
64            echo "Invalid run";
65            exit;
66    }
67    $status_file = fopen($status_name, "r");
68    
69  while (!feof($status_file)) {  while (!feof($status_file)) {
70          $line = fgets($status_file);          $line = fgets($status_file);
71          if (preg_match("/^(.*): (.*)$/", $line, $matches)) {          if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
# Line 70  foreach ($failure as $rpm) { Line 110  foreach ($failure as $rpm) {
110                  $status = " <span style='color:green;'><b>Fixed!</b></span>";                  $status = " <span style='color:green;'><b>Fixed!</b></span>";
111          } elseif ($removed[$rpm]) {          } elseif ($removed[$rpm]) {
112                  $status = " <span style='color:yellow;'><b>Removed</b></span>";                  $status = " <span style='color:yellow;'><b>Removed</b></span>";
113            } elseif ($prev && !$prev_failure[$rpm]) {
114                    $status = " <span style='color:red;'><b>New!</b></span>";
115          }          }
116          echo "<li><a href='$base_dir/$rpm/'>$rpm</a>$status</li>\n";          echo "<li><a href='$base_dir/$rpm/'>$rpm</a>$status</li>\n";
117  }  }

Legend:
Removed from v.6728  
changed lines
  Added in v.6729

  ViewVC Help
Powered by ViewVC 1.1.26