[Collab-qa-commits] r1860 - in collab-qa-tools: bin lib/collab-qa
Lucas Nussbaum
lucas at alioth.debian.org
Sat Dec 11 21:15:53 UTC 2010
Author: lucas
Date: 2010-12-11 21:15:53 +0000 (Sat, 11 Dec 2010)
New Revision: 1860
Modified:
collab-qa-tools/bin/cqa-fetchbugs
collab-qa-tools/lib/collab-qa/log-parser-instest.rb
collab-qa-tools/lib/collab-qa/log-parser.rb
Log:
improve log parsing scripts for instest
Modified: collab-qa-tools/bin/cqa-fetchbugs
===================================================================
--- collab-qa-tools/bin/cqa-fetchbugs 2010-12-09 12:28:52 UTC (rev 1859)
+++ collab-qa-tools/bin/cqa-fetchbugs 2010-12-11 21:15:53 UTC (rev 1860)
@@ -62,12 +62,14 @@
log = CollabQA::Log::new(l)
pkg = log.package
if not File::exists?(".bugs.#{pkg}")
- bugs = bts.get_bugs(['src', pkg])
+ bugs1 = bts.get_bugs(['src', pkg])
+ bugs2 = bts.get_bugs(['package', pkg])
+ bugs = bugs1 + bugs2
status = bts.get_status(bugs)
f = File::new(".bugs.#{pkg}.new", 'w')
if bugs.length > 0
status.each_pair do |k,v|
- next if (not ['serious', 'grave', 'critical'].include?(v.severity)) and v.subject !~ /ftbfs/i and v.subject !~ /piuparts/i and v.subject !~ /installation/i and v.subject !~ /(post|pre)(rm|inst)/i and v.subject !~ /buil(d|t)/i and v.subject !~ /remov/i and v.subject !~ /purge/i and v.subject !~ /upgrade/i
+ next if (not ['serious', 'grave', 'critical'].include?(v.severity)) and v.subject !~ /ftbfs/i and v.subject !~ /piuparts/i and v.subject !~ /installation/i and v.subject !~ /(post|pre)(rm|inst)/i and v.subject !~ /buil(d|t)/i and v.subject !~ /remov/i and v.subject !~ /purge/i and v.subject !~ /upgrade/i and v.subject !~ /prompt/ and v.subject !~ /conffile/
f.puts "#{k} #{v.severity} #{v.subject} || #{v.done}"
end
end
Modified: collab-qa-tools/lib/collab-qa/log-parser-instest.rb
===================================================================
--- collab-qa-tools/lib/collab-qa/log-parser-instest.rb 2010-12-09 12:28:52 UTC (rev 1859)
+++ collab-qa-tools/lib/collab-qa/log-parser-instest.rb 2010-12-11 21:15:53 UTC (rev 1860)
@@ -26,6 +26,23 @@
if @data =~ /Can't connect to local MySQL server through socket/
@reasons << 'mysql'
end
+ if @data =~ /Modified \(by you or by a script\) since installation./
+ @comment = <<EOF
+Note that the configuration files were not modified during the test,
+so this should not happen.
+EOF
+ @reasons << 'modified-conffile'
+ end
+ if @data =~ /File on system created by you or by a script./
+ @comment = <<EOF
+Note that no configuration files were created during the test,
+so this should not happen.
+EOF
+ @reasons << 'created-conffile'
+ end
+ if @data =~ /trying to overwrite.*which is also in package.*/
+ @reasons << 'overwrite-file'
+ end
end
def extract_log_instest
@@ -33,7 +50,7 @@
@extract = []
@sum_ml = []
if @reasons.include?('find-deps')
- g1 = @lines.grep_index(/^-- Finding depends and recommends: FAILED$/)[0]
+ g1 = @lines.grep_index(/^-- Finding depends( and recommends)?: FAILED$/)[0]
g2 = @lines.grep_index(/^-- Result: /)[0]
@sum_ml = @extract = @lines[g1+1..g2-1]
@sum_1l = "not installable"
@@ -69,9 +86,20 @@
g1 = @lines.grep_index(/^-- Removing all dependencies: OK$/)[0]
lines = @lines[g1..-1]
g2 = lines.grep_index(/^-- Now testing upgrade from/)[0]
+ if g2.nil?
+ g2 = lines.grep_index(/^-- Result: FAILED/)[0]
+ end
@sum_ml = @extract = lines[0..g2-1]
@sum_1l = "package purge (after dependencies removal) fails"
- elsif @reasons.include?('find-rm-after-upgrade') or @reasons.include?('pkg-upgrade')
+ elsif @reasons.include?('find-rm-after-upgrade') or @reasons.include?('pkg-upgrade') or @reasons.include?('upgrade-old')
+ if @reasons.include?('pkg-upgrade')
+ l = @lines.grep(/-- New version is unstable version:/)[0]
+ if l =~ /UNINSTALLED/
+ @reasons << 'removed-during-upgrade'
+ else
+ @reasons << 'not-upgraded'
+ end
+ end
g1 = @lines.grep_index(/^-- Now testing upgrade from /)[0]
lines = @lines[g1..-1]
g2 = lines.grep_index(/^-- Result: FAILED/)[0]
Modified: collab-qa-tools/lib/collab-qa/log-parser.rb
===================================================================
--- collab-qa-tools/lib/collab-qa/log-parser.rb 2010-12-09 12:28:52 UTC (rev 1859)
+++ collab-qa-tools/lib/collab-qa/log-parser.rb 2010-12-11 21:15:53 UTC (rev 1860)
@@ -16,7 +16,7 @@
module CollabQA
class Log
- attr_reader :file, :data, :lines, :package, :version, :result, :time, :reasons, :sum_1l, :sum_ml, :extract, :logtype
+ attr_reader :file, :data, :lines, :package, :version, :result, :time, :reasons, :sum_1l, :sum_ml, :extract, :logtype, :comment
def initialize(file)
@file = file
@@ -25,6 +25,7 @@
@reasons, @sum_1l, @sum_ml, @extract = nil
@logtype = nil
@package, @version, @result, @time, @buildtime = 'UNKNOWN'
+ @comment = nil
dbh = @lines.grep(/^DC-Build-Header:/)[0]
if dbh
@@ -184,11 +185,11 @@
Hi,
-While testing the installation of all packages in unstable, I ran
+While testing the installation of all packages in squeeze, I ran
into the following problem:
> #{@extract.map { |l| l.gsub(/^\s+/,'') }.join("\n> ")}
-
+#{@comment != nil ? "\n" + @comment.rstrip + "\n": ''}
The full build log is available from:
http://people.debian.org/~lucas/logs/#{date}/#{@package}.log
More information about the Collab-qa-commits
mailing list