[Git][reproducible-builds/diffoscope][master] 2 commits: external_tools: list `lipo` and `otool`, and a test to make sure they are all listed
Mattia Rizzolo
gitlab at salsa.debian.org
Sat Jan 2 14:24:53 UTC 2021
Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope
Commits:
72fe5340 by Mattia Rizzolo at 2021-01-02T15:23:58+01:00
external_tools: list `lipo` and `otool`, and a test to make sure they are all listed
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
- - - - -
c9820241 by Mattia Rizzolo at 2021-01-02T15:24:14+01:00
Fix possible crash in --list-debian-substvars
Fixes: https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/228
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
- - - - -
3 changed files:
- diffoscope/external_tools.py
- diffoscope/main.py
- tests/test_tools.py
Changes:
=====================================
diffoscope/external_tools.py
=====================================
@@ -103,6 +103,7 @@ EXTERNAL_TOOLS = {
"guix": "python-jsbeautifier",
},
"kbxutil": {"debian": "gnupg-utils", "guix": "gnupg"},
+ "lipo": {},
"llvm-bcanalyzer": {"debian": "llvm", "arch": "llvm", "guix": "llvm"},
"llvm-config": {"debian": "llvm", "arch": "llvm"},
"llvm-dis": {"debian": "llvm", "arch": "llvm", "guix": "llvm"},
@@ -144,6 +145,7 @@ EXTERNAL_TOOLS = {
"odt2txt": {"debian": "odt2txt", "arch": "odt2txt", "guix": "odt2txt"},
"oggDump": {"debian": "oggvideotools"},
"openssl": {"debian": "openssl", "guix": "openssl"},
+ "otool": {},
"pgpdump": {"debian": "pgpdump", "arch": "pgpdump", "guix": "pgpdump"},
"pdftotext": {
"debian": "poppler-utils",
=====================================
diffoscope/main.py
=====================================
@@ -586,7 +586,8 @@ class ListDebianSubstvarsAction(argparse._StoreTrueAction):
try:
pkg = EXTERNAL_TOOLS[x]["debian"]
except KeyError:
- pass
+ continue
+
packages.add(pkg)
if x not in HUGE_TOOLS:
packages_minimal.add(pkg)
=====================================
tests/test_tools.py
=====================================
@@ -42,3 +42,17 @@ def test_required_tool_not_found():
with pytest.raises(RequiredToolNotFound):
fn()
+
+
+def test_all_tools_are_listed():
+ from diffoscope.comparators import ComparatorManager
+ from diffoscope.external_tools import EXTERNAL_TOOLS
+ from diffoscope.tools import tool_required
+
+ ComparatorManager().reload()
+
+ tools = set(tool_required.all)
+
+ for x in tools:
+ if x not in EXTERNAL_TOOLS:
+ pytest.fail(f"{x} is not present in EXTERNAL_TOOLS")
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/f4ba3c4205ab51238c7a80f85d08c6f23a7fce14...c9820241f623316f5d4e129f65263764a14c3dde
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/f4ba3c4205ab51238c7a80f85d08c6f23a7fce14...c9820241f623316f5d4e129f65263764a14c3dde
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20210102/2c106489/attachment.htm>
More information about the rb-commits
mailing list