[Collab-qa-commits] r235 - / debcluster testing-status testing-status/comments

lucas at alioth.debian.org lucas at alioth.debian.org
Sat Jun 16 23:03:42 UTC 2007


Author: lucas
Date: 2007-06-16 23:03:42 +0000 (Sat, 16 Jun 2007)
New Revision: 235

Added:
   testing-status/
   testing-status/comments/
   testing-status/comments/comments.txt
   testing-status/data2html.rb
   testing-status/learn-from-sdn.rb
   testing-status/parseinfo.rb
   testing-status/pkgtestingstatus.rb
Modified:
   debcluster/Notes
Log:
added testing status scripts

Modified: debcluster/Notes
===================================================================
--- debcluster/Notes	2007-06-15 13:15:17 UTC (rev 234)
+++ debcluster/Notes	2007-06-16 23:03:42 UTC (rev 235)
@@ -77,6 +77,18 @@
 MASTER=node-11.lyon.grid5000.fr
 oarsub -q deploy -l nodes=${NODES},walltime=${WALLTIME} "/home/grenoble/lnussbaum/katapult --deploy-env ${ENV} --deploy-part ${PART} --copy-ssh-key --min-nodes 2 --sleep /home/grenoble/lnussbaum/addnodes.rb ${MASTER}"
 
+ENV=sid-x64-base-1.0
+PART=sda3
+for p in 1 2 4 6 8; do
+p=6
+oarsub -p "cluster='grelon'" -q deploy -l nodes=1,walltime=10 "/home/grenoble/lnussbaum/katapult --deploy-env ${ENV} --deploy-part ${PART} --copy-ssh-key --sleep /home/grenoble/lnussbaum/startnodes.rb /debcluster-data/oo/buildoo.rb $p 1 o"
+
+cat ../res.sym.ok | while read n; do
+set $n
+if grep dpkg-shlib ${1}_${2}_sid32.buildlog | grep -q "warning"; then
+echo $n
+fi
+done
 ##################### PIUPARTS
 piuparts -a -b /debcluster-data/chroots/etch32-piuparts.tgz -d etch -m 'http://idpot.grenoble.grid5000.fr/debian' feed2imap 
 
@@ -180,10 +192,10 @@
 
 # Analyzing results
 
-ssh gluck mkdir public_html/logs/2007/05/13/
+ssh gluck mkdir public_html/logs/2007/06/13/
 
-cat ../res.sid-i386.2007-05-13 | grep -v " OK " | awk '{print $1 "_" $2 "_sid32.buildlog"}' > /tmp/loglist
+cat ../res.sid-i386.2007-06-13 | grep -v " OK " | awk '{print $1 "_" $2 "_sid32.buildlog"}' > /tmp/loglist
 
-rsync -avzP $(</tmp/loglist) lucas at gluck.debian.org:public_html/logs/2007/05/13/
+rsync -avzP $(</tmp/loglist) lucas at gluck.debian.org:public_html/logs/2007/06/13/
 
 ssh gluck chmod -R a+rX public_html/

Added: testing-status/comments/comments.txt
===================================================================
--- testing-status/comments/comments.txt	                        (rev 0)
+++ testing-status/comments/comments.txt	2007-06-16 23:03:42 UTC (rev 235)
@@ -0,0 +1 @@
+gnumach OK, Hurd-related

Added: testing-status/data2html.rb
===================================================================
--- testing-status/data2html.rb	                        (rev 0)
+++ testing-status/data2html.rb	2007-06-16 23:03:42 UTC (rev 235)
@@ -0,0 +1,103 @@
+#!/usr/bin/ruby -w
+
+require 'date'
+require 'pkgtestingstatus'
+
+#$curdate = Date::now
+$curdate = Date::parse('2007-06-07')
+
+pkgs = PkgTestingStatus::read(STDIN)
+
+# read comments
+comments = {}
+IO::read('comments/comments.txt').each_line do |l|
+  p, c = l.split(' ', 2)
+  comments[p] = c
+end
+
+# read wnpp data
+orphaned = {}
+str = `wget -q -O - http://www.debian.org/devel/wnpp/orphaned`.chomp
+str.scan(/<a href="http:\/\/bugs.debian.org\/(\d+)">(\w+):/) do |bug, pkg|
+  orphaned[pkg] = bug
+end
+
+# exclude non-interesting stuff
+pkgs = pkgs.to_a.reject { |p| ($curdate - p[1].sync < 10) or (p[1].inunstable != $curdate) }
+
+puts <<-EOF
+<html>
+<head>
+<title>Packages testing status</title>
+<style type="text/css">
+print status information
+html, body { 
+        background-color: #FFFFFF; 
+        color: #000000;
+        font-family: sans-serif;
+}
+
+h1 {
+        text-align: center;
+}
+
+
+table {
+        border: 1px solid black;
+        padding: 0px;
+        border-collapse: collapse;
+}
+
+th {
+        border: 1px solid black;
+        padding-top: 3px;
+        padding-bottom: 3px;
+        padding-left: 5px;
+        padding-right: 5px;
+}
+
+td {
+        border: 1px dotted black;
+        padding: 3px;
+        text-align: center;
+}
+</style>
+</head>
+<body>
+<h1>Packages testing status</h1>
+<p>This page answers the two following questions:</p>
+<ul>
+<li><b>When was package X last in testing ?</b></li>
+<li><b>When was package X last in sync between testing and unstable ?</b></li>
+</ul>
+<p>(The second question is useful in the case of packages that are in testing, but where newer versions fail to transition.)</p>
+<p>Packages which were last in sync less than 10 days ago are excluded.</p>
+<p><a href="#lasttesting">List sorted by how long ago the package was last in testing</a><br/>
+<a href="#lastsync">List sorted by how long ago the package was last the same in testing and unstable</a></p>
+<a name="lasttesting"></a>
+<h2>List sorted by how long ago the package was last in testing</h2>
+<p>Packages in testing are excluded from the list, even if the version in unstable differs.</p>
+<table border="1">
+<tr><th rowspan='2'>package</th><th colspan='3'>last in testing</th>
+<th colspan='3'>last in sync</th><th colspan='2'>unstable</th><th rowspan='2'>comments</th></tr>
+<tr><th>date</th><th>days</th><th>version</th><th>date</th><th>days</th><th>version</th><th>version</th><th>first seen</th></tr>
+EOF
+
+pkgs.reject { |p| p[1].intesting == $curdate }.sort { |a, b| a[1].testingdays <=> b[1].testingdays }.reverse.each do |p|
+  puts p[1].to_row(p[0], orphaned[p[0]], comments[p[0]])
+end
+
+puts "</table>"
+puts <<-EOF
+<a name="lastsync"></a>
+<h2>List sorted by how long ago the package was last the same in testing and unstable</h2>
+<table border="1">
+<tr><th rowspan='2'>package</th><th colspan='3'>last in testing</th>
+<th colspan='3'>last in sync</th><th colspan='2'>unstable</th><th rowspan='2'>comments</th></tr>
+<tr><th>date</th><th>days</th><th>version</th><th>date</th><th>days</th><th>version</th><th>version</th><th>first seen</th></tr>
+EOF
+pkgs.sort { |a, b| a[1].syncdays <=> b[1].syncdays }.reverse.each do |p|
+  puts p[1].to_row(p[0], orphaned[p[0]], comments[p[0]])
+end
+puts "</table>"
+puts "</body></html>"


Property changes on: testing-status/data2html.rb
___________________________________________________________________
Name: svn:executable
   + *

Added: testing-status/learn-from-sdn.rb
===================================================================
--- testing-status/learn-from-sdn.rb	                        (rev 0)
+++ testing-status/learn-from-sdn.rb	2007-06-16 23:03:42 UTC (rev 235)
@@ -0,0 +1,22 @@
+#!/usr/bin/ruby -w
+
+require 'date'
+
+file = 'data.orig'
+d = Date::parse('2005-03-13')
+de = Date::parse('2007-06-13')
+
+while d <= de
+  puts "#{d} ..."
+  newfile = "data.#{d}"
+  system("cp #{file} #{newfile}")
+  nd = d.to_s.gsub('-', '/')
+  system("./parseinfo.rb #{d} http://athlon64.fsij.org/archive/#{nd}/debian/dists < #{newfile} > tmp")
+  if $?.exitstatus != 0
+    puts "Error! exit code: #{$?}."
+    exit(1)
+  end
+  system("mv tmp #{newfile}")
+  d = d + 1
+  file = newfile
+end


Property changes on: testing-status/learn-from-sdn.rb
___________________________________________________________________
Name: svn:executable
   + *

Added: testing-status/parseinfo.rb
===================================================================
--- testing-status/parseinfo.rb	                        (rev 0)
+++ testing-status/parseinfo.rb	2007-06-16 23:03:42 UTC (rev 235)
@@ -0,0 +1,78 @@
+#!/usr/bin/ruby -w
+
+require 'date'
+require 'thread'
+require 'pkgtestingstatus'
+
+raise "Wrong number of args" if ARGV.length != 2
+date = Date::parse(ARGV[0])
+file = ARGV[1]
+
+$datezero = Date::parse('0000-01-01')
+
+def readsources(file)
+  # read Sources
+  if file =~ /^http:\/\//
+    str = `wget -q -O - #{file} | gunzip`
+  else
+    str = IO::read(file)
+  end
+  pkg = nil
+  vers = nil
+  pkgsinfile = {}
+  str.each_line do |l|
+    if l =~ /^Package: /
+      pkg = l.split(' ')[1].chomp
+    elsif l =~ /^Version: /
+      vers = l.split(' ')[1].chomp
+      pkgsinfile[pkg] = vers
+    end
+  end
+  return pkgsinfile
+end
+
+pkgs = PkgTestingStatus::read(STDIN)
+
+class PkgSrc
+  attr_accessor :testing, :unstable
+end
+
+pkgsrcs = {}
+srcs = []
+ths = []
+mutex = Mutex::new
+['testing', 'unstable'].each do |dist|
+  ['non-free', 'contrib', 'main'].each do |sect|
+    ths << Thread::new(dist, sect) do |dist, sect|
+      t = readsources(file + "/#{dist}/#{sect}/source/Sources.gz")
+      mutex.synchonize { srcs << t }
+    end
+  end
+end
+ths.each { |t| t.join }
+['testing', 'unstable'].each do |dist|
+  ['non-free', 'contrib', 'main'].each do |sect|
+    srcs.collect({}) { |a, b| a += b }.each_pair do |k, v|
+      pkgsrcs[k] = PkgSrc::new if not pkgsrcs.has_key?(k)
+      if dist == 'testing'
+        pkgsrcs[k].testing = v
+      elsif dist == 'unstable'
+        pkgsrcs[k].unstable = v
+      end
+    end 
+  end
+end
+
+# combine data
+pkgsrcs.each_pair do |p, v|
+  if not pkgs.has_key?(p)
+    pkgs[p] = PkgData::new($datezero, '-', $datezero, '-', $datezero, '-', date)
+  end
+  pkgs[p].update(date, v.testing, v.unstable)
+
+end
+
+# output
+pkgs.to_a.sort { |a,b| a[0] <=> b[0] }.each do |e|
+  puts "#{e[0]} #{e[1]}"
+end


Property changes on: testing-status/parseinfo.rb
___________________________________________________________________
Name: svn:executable
   + *

Added: testing-status/pkgtestingstatus.rb
===================================================================
--- testing-status/pkgtestingstatus.rb	                        (rev 0)
+++ testing-status/pkgtestingstatus.rb	2007-06-16 23:03:42 UTC (rev 235)
@@ -0,0 +1,107 @@
+class PkgTestingStatus
+  @@datezero = Date::parse('0000-01-01')
+
+  attr_accessor :intesting, :testingversion, :inunstable, :unstableversion, :sync, :syncversion, :firstinunstable
+  def initialize(t,tv,u,uv, s, sv, fu)
+    @intesting = t
+    @testingversion = tv
+    @inunstable = u
+    @unstableversion = uv
+    @sync = s
+    @syncversion = sv
+    @firstinunstable = fu
+  end
+
+  def to_s
+    "#{@intesting} #{@testingversion} #{@inunstable} #{@unstableversion} #{@sync} #{@syncversion} #{@firstinunstable}"
+  end
+
+  def testing_s
+    if @intesting == @@datezero
+      d = 'never'
+      v = ''
+      days = ''
+    else
+      d = @intesting
+      v = @testingversion
+      days = $curdate - @intesting
+    end
+    return "<td>#{d}</td><td>#{days}</td><td>#{v}</td>"
+  end
+
+  def sync_s
+    if @sync == @@datezero
+      d = 'never'
+      v = ''
+      days = ''
+    else
+      d = @sync
+      v = @syncversion
+      days = $curdate - @sync
+    end
+    return "<td>#{d}</td><td>#{days}</td><td>#{v}</td>"
+  end
+
+  def testingdays
+    if @intesting != @@datezero
+      return $curdate - @intesting
+    else
+      return 10000 + ($curdate - @firstinunstable)
+    end
+  end
+  def syncdays
+    if @sync != @@datezero
+      return $curdate - @sync
+    else
+      return 1000000 + 1000 * ($curdate - @intesting) + ($curdate - @firstinunstable)
+    end
+  end
+
+  def to_row(pkg, orphaned = nil, comment = nil)
+    s = "<tr><td><a href=\"http://packages.qa.debian.org/#{pkg}\">#{pkg}</a>"
+    s += "<a href=\"http://bugs.debian.org/#{orphaned}\">(O)</a>" if orphaned
+    s += "</td>"
+    s += "#{testing_s}#{sync_s}"
+    s += "<td>#{@unstableversion}</td><td>#{@firstinunstable}</td><td>"
+    s += comment if comment
+    s += "</td></tr>"
+    return s
+  end
+
+  def update(curdate, testing, unstable)
+    if testing
+      if curdate > @intesting
+        @intesting = curdate 
+        @testingversion = testing
+      else
+        puts "[testing] #{curdate} < #{@intesting}, skipping"
+      end
+    end
+    if unstable
+      if curdate > @inunstable
+        @inunstable = curdate 
+        @unstableversion = unstable
+      else
+        puts "[unstable] #{curdate} < #{@inunstable}, skipping"
+      end
+    end
+    if unstable and unstable == testing
+      if curdate > @sync
+        @sync = curdate 
+        @syncversion = unstable
+      else
+        puts "[sync] #{curdate} < #{@sync}, skipping"
+      end
+    end
+  end
+
+  def PkgTestingStatus::read(io)
+    pkgs = {}
+    STDIN.read.each_line do |l|
+      p, t, tv, u, uv, s, sv, fu = l.split(' ')
+      pkgs[p] = PkgTestingStatus::new(Date::parse(t), tv, Date::parse(u),
+                                      uv, Date::parse(s), sv, Date::parse(fu))
+    end
+    return pkgs
+  end
+end




More information about the Collab-qa-commits mailing list