Package: autopkgtest
Version: 4.1
Severity: minor
Tags: patch

While testing a package (sorry, I don't remember how to reproduce this)
I got a failure from source_rules_command(), in which 3 lines of results
were apparently expected but 4 were received, or possibly the other way
round. This is an unhelpful message, because it didn't tell me what the
4 lines that were received *were*.

The attached patch makes this somewhat easier to diagnose.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages autopkgtest depends on:
ii  apt-utils       1.3.1
ii  libdpkg-perl    1.18.10
ii  procps          2:3.3.12-2
ii  python3         3.5.1-4
ii  python3-debian  0.1.29

Versions of packages autopkgtest recommends:
ii  autodep8  0.8

Versions of packages autopkgtest suggests:
pn  lxc          <none>
pn  lxd-client   <none>
ii  qemu-system  1:2.7+dfsg-1
ii  qemu-utils   1:2.7+dfsg-1
ii  schroot      1.6.10-2+b1

-- no debconf information
>From f74c875b2d0b4c8ed858762ee8548b372453ce03 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Thu, 27 Oct 2016 15:01:02 +0100
Subject: [PATCH 1/5] source_rules_command: log the result we got if it is not
 as expected

Signed-off-by: Simon McVittie <[email protected]>
---
 runner/autopkgtest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runner/autopkgtest b/runner/autopkgtest
index 873acbe..0753910 100755
--- a/runner/autopkgtest
+++ b/runner/autopkgtest
@@ -288,8 +288,8 @@ def source_rules_command(script, which, cwd=None, results_lines=0):
         else:
             adtlog.badpkg('rules %s failed with exit code %d' % (which, rc))
     if results_lines is not None and len(results) != results_lines:
-        adtlog.badpkg('got %d lines of results from %s where %d expected'
-                      % (len(results), which, results_lines))
+        adtlog.badpkg('got %d lines of results from %s where %d expected: %r'
+                      % (len(results), which, results_lines, results))
     if results_lines == 1:
         return results[0]
     return results
-- 
2.10.1

Reply via email to