[Collab-qa-commits] r1724 - in collab-qa-tools: lib/collab-qa test/dest test/source
Lucas Nussbaum
lucas at alioth.debian.org
Tue Mar 16 22:20:14 UTC 2010
Author: lucas
Date: 2010-03-16 22:20:14 +0000 (Tue, 16 Mar 2010)
New Revision: 1724
Added:
collab-qa-tools/lib/collab-qa/log-parser-instest.rb
collab-qa-tools/test/dest/opensync-plugin-barry.output
collab-qa-tools/test/source/opensync-plugin-barry.log
Modified:
collab-qa-tools/lib/collab-qa/log-parser.rb
Log:
start work on inst test log parser
Added: collab-qa-tools/lib/collab-qa/log-parser-instest.rb
===================================================================
--- collab-qa-tools/lib/collab-qa/log-parser-instest.rb (rev 0)
+++ collab-qa-tools/lib/collab-qa/log-parser-instest.rb 2010-03-16 22:20:14 UTC (rev 1724)
@@ -0,0 +1,27 @@
+module CollabQA
+ class Log
+ def guess_failed_instest
+ tf = @lines.grep(/^-- Tests Failed: /)
+ if tf.length > 0
+ @reasons = tf[0].split(' ')[3..-1]
+ #@result = 'OK' if @reasons == ['inst-old'] or @reasons == ['upgrade-old'] or @reasons == ['pkg-upgrade']
+ else
+ @reasons = []
+ end
+ if @data =~ /mysql/
+ @reasons << 'mysql'
+ end
+
+ def extract_log_instest
+ @sum_1l = "XXX"
+ @extract = []
+ @sum_ml = []
+ if @reasons.include?('find-deps')
+ g1 = @lines.grep_index(/^-- Finding depends: FAILED$/)[0]
+ g2 = @lines.grep_index(/^-- Result: /)[0]
+ @sum_ml = @extract = @lines[g1+1..g2-1]
+ @sum_1l = "#{@package} is not installable"
+ end
+ end
+ end
+end
Modified: collab-qa-tools/lib/collab-qa/log-parser.rb
===================================================================
--- collab-qa-tools/lib/collab-qa/log-parser.rb 2010-03-14 19:46:59 UTC (rev 1723)
+++ collab-qa-tools/lib/collab-qa/log-parser.rb 2010-03-16 22:20:14 UTC (rev 1724)
@@ -1,5 +1,6 @@
require 'collab-qa/log-parser-build'
require 'collab-qa/log-parser-piuparts'
+require 'collab-qa/log-parser-instest'
module Enumerable
def grep_index(re)
@@ -68,6 +69,26 @@
@result = "Unknown"
@time = 0
end
+ else
+ dph = @lines.grep(/^IT-Header:/)[0]
+ if dph
+ @logtype = :instest
+ junk, @package, rest = dph.split(' ', 4)
+ ver = @lines.grep(/^-- Finding version: /)[0]
+ if ver
+ @version = ver.split(' ')[4]
+ else
+ @version = 'UNKNOWN'
+ end
+ dps = @lines.grep(/^-- Result: /)[0]
+ if dps
+ @result = dps.split(' ')[2]
+ @time = @lines.grep(/^-- Total time: /)[4].to_f
+ else
+ @result = "Unknown"
+ @time = 0
+ end
+ end
end
end
end
@@ -86,6 +107,8 @@
guess_failed_build
elsif @logtype == :piuparts
guess_failed_piuparts
+ elsif @logtype == :instest
+ guess_failed_instest
end
end
@@ -96,6 +119,8 @@
extract_log_build
elsif @logtype == :piuparts
extract_log_piuparts
+ elsif @logtype == :instest
+ extract_log_instest
end
end
Added: collab-qa-tools/test/dest/opensync-plugin-barry.output
===================================================================
--- collab-qa-tools/test/dest/opensync-plugin-barry.output (rev 0)
+++ collab-qa-tools/test/dest/opensync-plugin-barry.output 2010-03-16 22:20:14 UTC (rev 1724)
@@ -0,0 +1,35 @@
+opensync-plugin-barry 0.15-1 FAILED 0.0
+Reason: find-deps
+
+1-line summary:
+opensync-plugin-barry is not installable
+
+multi-line summary:
+ Reading package lists...
+ Building dependency tree...
+ Reading state information...
+ Some packages could not be installed. This may mean that you have
+ requested an impossible situation or if you are using the unstable
+ distribution that some required packages have not yet been created
+ or been moved out of Incoming.
+ The following information may help to resolve the situation:
+
+ The following packages have unmet dependencies:
+ opensync-plugin-barry: Depends: libopensync0 (>= 0.22) but it is not installable
+ Depends: libopensync0 (< 0.30) but it is not installable
+ E: Broken packages
+
+excerpt for mail:
+ Reading package lists...
+ Building dependency tree...
+ Reading state information...
+ Some packages could not be installed. This may mean that you have
+ requested an impossible situation or if you are using the unstable
+ distribution that some required packages have not yet been created
+ or been moved out of Incoming.
+ The following information may help to resolve the situation:
+
+ The following packages have unmet dependencies:
+ opensync-plugin-barry: Depends: libopensync0 (>= 0.22) but it is not installable
+ Depends: libopensync0 (< 0.30) but it is not installable
+ E: Broken packages
Added: collab-qa-tools/test/source/opensync-plugin-barry.log
===================================================================
--- collab-qa-tools/test/source/opensync-plugin-barry.log (rev 0)
+++ collab-qa-tools/test/source/opensync-plugin-barry.log 2010-03-16 22:20:14 UTC (rev 1724)
@@ -0,0 +1,20 @@
+IT-Header: opensync-plugin-barry lsid64 / Tue Mar 16 00:04:19 +0100 2010
+-- Finding version: opensync-plugin-barry 0.15-1
+-- Finding depends: FAILED
+ Reading package lists...
+ Building dependency tree...
+ Reading state information...
+ Some packages could not be installed. This may mean that you have
+ requested an impossible situation or if you are using the unstable
+ distribution that some required packages have not yet been created
+ or been moved out of Incoming.
+ The following information may help to resolve the situation:
+
+ The following packages have unmet dependencies:
+ opensync-plugin-barry: Depends: libopensync0 (>= 0.22) but it is not installable
+ Depends: libopensync0 (< 0.30) but it is not installable
+ E: Broken packages
+-- Result: FAILED
+-- Total time: 35.725875s
+-- Tests OK:
+-- Tests Failed: find-deps
More information about the Collab-qa-commits
mailing list