/usr/bin/cqa-merge-results is in collab-qa-tools 0.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #!/usr/bin/ruby
class Result
attr_accessor :version, :result, :guess, :explanation
def to_s
"#{@version} #{@result} #{@guess} #{@explanation}"
end
end
previous = {}
IO::read(ARGV[0]).each_line do |l|
l.chomp!
r = Result::new
p, r.version, r.result, r.guess, r.explanation = l.split(' ', 5)
if r.explanation.nil?
r.explanation = ""
end
# cleanup old explanations
r.explanation.gsub!(/ NEWFAIL$/ ,'')
previous[p] = r
end
IO::read(ARGV[1]).each_line do |l|
l.chomp!
r = Result::new
pkg, r.version, r.result, r.guess, r.explanation = l.split(' ', 5)
prev = previous[pkg]
if prev.nil?
if r.explanation.nil?
r.explanation = "TODO NEWFAIL"
else
r.explanation += " TODO NEWFAIL"
end
elsif prev.explanation !~ / TODO/
r.explanation = prev.explanation
r.explanation.gsub!(/RECHECK[^\s]*/,'')
r.explanation.gsub!(/NEWFAIL/, '')
r.explanation.gsub!(/\s+/, ' ')
r.explanation += " RECHECK"
r.explanation += " RECHECK_VERSION" if r.version != prev.version
r.explanation += " RECHECK_GUESS" if r.guess != prev.guess
else
r.explanation = prev.explanation
end
previous.delete(pkg)
puts "#{pkg} #{r}"
end
File::open('no-longer-fails', 'w') do |f|
previous.each_pair do |pkg, val|
f.puts pkg + ' ' + val.to_s
end
end
|