Browse Source

adtsummary_tap: support output of recent versions of autopkgtest

I'm not 100% sure about when exactly the autopkgtest output changed (I
don't have a setup with an older version of autopkgtest easily
available), but since version 2.2.3+nmu1 the autopkgtest output seems
to be different from what we expected.  For now still support what we
had but also properly support the adt-run output we see on our recent
builds.

Development sponsored by Sipwise GmbH
tags/devuan/0.14.1+devuan6
Michael Prokop 6 years ago
parent
commit
e4e2f7b400
2 changed files with 8 additions and 3 deletions
  1. +1
    -1
      pbuilder-hookdir/B20autopkgtest
  2. +7
    -2
      tap/adtsummary_tap

+ 1
- 1
pbuilder-hookdir/B20autopkgtest View File

@@ -40,6 +40,6 @@ binaries=$(awk '/\.deb / { print "--binary ../" $1 }' debian/files)
adt-run --tmp-dir $TMPADT/out --summary $TMPADT/summary \
$binaries --built-tree $PWD --- adt-virt-null || EXIT=$?

# 4 means some test failed, exit 0 here and let adtsummary2junit report the failure
# 4 means some test failed, exit 0 here and let adtsummary_tap report the failure
[ ${EXIT:-0} = 4 ] && exit 0
exit ${EXIT:-0}

+ 7
- 2
tap/adtsummary_tap View File

@@ -27,9 +27,14 @@ puts "1..#{num_lines}"
output.gsub(/:\n/, ':').each_line do |critic|
if critic =~ /.*PASS.*/
cmd = /(.*)? (PASS)$/.match(critic)[1]
puts "ok #{counter} #{cmd}"
puts "ok #{counter} #{cmd} passed"
counter += 1
elsif critic =~ /.*FAIL status.*/
elsif critic =~ /.*FAIL.*status.*/ # versions >= 2.2.3+nmu1 of autopkgtest
test = /(.*)? (FAIL non-zero exit status )(.*)?/.match(critic)[1]
status = /(.*)? (FAIL non-zero exit status )(.*)?/.match(critic)[3]
puts "not ok #{counter} #{test} - exit status #{status}"
counter += 1
elsif critic =~ /.*FAIL status.*/ # older versions of autopkgtest
test = /(.*)? (FAIL status:)(.*)?/.match(critic)[1]
cmd = /(.*)? (FAIL status:)(.*)?/.match(critic)[3]
puts "not ok #{counter} #{test} #{cmd}"


Loading…
Cancel
Save