[diffoscope] 01/01: tests: Use dpkg-query over dpkg -l to avoid include the package short descriptions as they can trigger our log parser warnings.

Chris Lamb chris at chris-lamb.co.uk
Tue Apr 4 17:03:06 CEST 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch experimental
in repository diffoscope.

commit 244b03d03fa90aada3c2a4b49bc64bd68e787361
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Apr 4 17:02:34 2017 +0200

    tests: Use dpkg-query over dpkg -l to avoid include the package short descriptions as they can trigger our log parser warnings.
---
 tests/conftest.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index 80cddc9..255f15b 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -55,11 +55,10 @@ def pytest_report_header(config):
         return
 
     try:
-        return [
-            "",
-            "Debian packages installed:",
-            "",
-            subprocess.check_output(('dpkg', '-l'))
-        ]
+        return ["", "Installed Debian packages:", "", subprocess.check_output((
+            'dpkg-query',
+            '-W',
+            '-f', '${db:Status-Abbrev}\t${binary:Package} (${Version})\n'
+        ))]
     except:
         pass

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list