[Collab-qa-commits] r496 - testing-status

lucas at alioth.debian.org lucas at alioth.debian.org
Sun Nov 4 13:47:10 UTC 2007


Author: lucas
Date: 2007-11-04 13:47:10 +0000 (Sun, 04 Nov 2007)
New Revision: 496

Modified:
   testing-status/data2html.rb
   testing-status/learn-from-sdn.rb
   testing-status/pkgtestingstatus.rb
Log:
update testing-status

Modified: testing-status/data2html.rb
===================================================================
--- testing-status/data2html.rb	2007-10-28 22:45:23 UTC (rev 495)
+++ testing-status/data2html.rb	2007-11-04 13:47:10 UTC (rev 496)
@@ -29,14 +29,15 @@
 end
 
 # exclude non-interesting stuff
-pkgs = pkgs.to_a.reject do |p|
+pkgsi = pkgs.to_a.reject do |p|
 #  puts "#{p[0]} #{$curdate} #{p[1].sync} #{p[1].inunstable}<br/>"
 #  puts "cl from sync" if $curdate - p[1].sync < 10
 #  puts "notinunstable" if p[1].inunstable != $curdate
   ($curdate - p[1].sync < 10) or (p[1].inunstable != $curdate)
 end
 
-puts <<-EOF
+f = File::new(ARGV[0] + 'testing-status.html', 'w')
+f.puts <<-EOF
 <html>
 <head>
 <title>Packages testing status</title>
@@ -95,12 +96,12 @@
 <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]])
+pkgsi.reject { |p| p[1].intesting == $curdate }.sort { |a, b| a[1].testingdays <=> b[1].testingdays }.reverse.each do |p|
+  f.puts p[1].to_row(p[0], orphaned[p[0]], comments[p[0]])
 end
 
-puts "</table>"
-puts <<-EOF
+f.puts "</table>"
+f.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">
@@ -108,8 +109,18 @@
 <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]])
+pkgsi.sort { |a, b| a[1].syncdays <=> b[1].syncdays }.reverse.each do |p|
+  f.puts p[1].to_row(p[0], orphaned[p[0]], comments[p[0]])
 end
-puts "</table>"
-puts "</body></html>"
+f.puts "</table>"
+f.puts "</body></html>"
+f.close
+
+f = File::new(ARGV[0] + 'testing-status.txt', 'w')
+pkgs.sort { |a,b| a[0] <=> b[0] }.each do |p|
+  f.print "#{p[0]} #{p[1].testingversion} #{p[1].unstableversion} #{p[1].firstinunstable} "
+  f.print "#{p[1].testingdays} #{p[1].intesting} "
+  f.print "#{p[1].syncdays} #{p[1].sync} #{p[1].syncversion}"
+  f.puts
+end
+f.close

Modified: testing-status/learn-from-sdn.rb
===================================================================
--- testing-status/learn-from-sdn.rb	2007-10-28 22:45:23 UTC (rev 495)
+++ testing-status/learn-from-sdn.rb	2007-11-04 13:47:10 UTC (rev 496)
@@ -2,9 +2,9 @@
 
 require 'date'
 
-file = 'data.2007-06-06'
-d = Date::parse('2007-06-07')
-de = Date::parse('2007-06-19')
+file = 'data.2007-06-19'
+d = Date::parse('2007-07-03')
+de = Date::parse('2007-07-08')
 incr = 1
 
 while d <= de

Modified: testing-status/pkgtestingstatus.rb
===================================================================
--- testing-status/pkgtestingstatus.rb	2007-10-28 22:45:23 UTC (rev 495)
+++ testing-status/pkgtestingstatus.rb	2007-11-04 13:47:10 UTC (rev 496)
@@ -49,7 +49,7 @@
     if @intesting != @@datezero
       return @@curdate - @intesting
     else
-      return 10000 + (@@curdate - @firstinunstable)
+      return (@@curdate - @firstinunstable)
     end
   end
 
@@ -89,7 +89,7 @@
     if @sync != @@datezero
       return @@curdate - @sync
     else
-      return 1000000 + 1000 * (@@curdate - @intesting) + (@@curdate - @firstinunstable)
+      return (@@curdate - @firstinunstable)
     end
   end
 




More information about the Collab-qa-commits mailing list