[Git][reproducible-builds/diffoscope][master] 2 commits: test_dex::test_javap_14_differences requires procyon.

Chris Lamb (@lamby) gitlab at salsa.debian.org
Wed Jul 12 17:38:04 UTC 2023



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
375be212 by Chris Lamb at 2023-07-12T18:37:08+01:00
test_dex::test_javap_14_differences requires procyon.

- - - - -
2f3dd0d9 by Chris Lamb at 2023-07-12T18:37:41+01:00
Fix "test skipped" reason generation in the case of a version outside of the required range.

- - - - -


2 changed files:

- tests/comparators/test_dex.py
- tests/utils/tools.py


Changes:

=====================================
tests/comparators/test_dex.py
=====================================
@@ -94,7 +94,7 @@ def test_differences(differences):
     check_dex_differences(differences, expected_diff)
 
 
- at skip_unless_tools_exist("enjarify", "zipinfo", "javap", "dexdump")
+ at skip_unless_tools_exist("enjarify", "zipinfo", "javap", "dexdump", "procyon")
 @skip_unless_tool_is_at_least("javap", javap_version, "14.0")
 @skip_unless_tool_is_at_least("enjarify", enjarify_version, "1.0.3")
 def test_javap_14_differences(differences):


=====================================
tests/utils/tools.py
=====================================
@@ -157,7 +157,7 @@ def skip_unless_tool_is_between(
         (vcls(str(actual_ver)) < vcls(str(min_ver)))
         or (vcls(str(actual_ver)) > vcls(str(max_ver))),
         reason="{} min {} >= {} ({} detected)".format(
-            reason(tool), min_ver, max_ver, actual_ver
+            reason(tool, force_include=True), min_ver, max_ver, actual_ver
         ),
         tools=(tool,),
     )
@@ -215,11 +215,11 @@ def skip_unless_file_version_is_at_least(version):
     return skip_unless_tool_is_at_least("file", file_version, version)
 
 
-def reason(*tools):
+def reason(*tools, force_include=False):
     xs = []
 
     for x in tools:
-        if not tools_missing(x):
+        if not tools_missing(x) and not force_include:
             continue
         provider = get_package_provider(x)
         if provider is None:
@@ -228,4 +228,7 @@ def reason(*tools):
 
         xs.append("{} (try installing {})".format(x, provider))
 
+    if not xs:
+        return ""
+
     return "requires {}".format(" and ".join(xs))



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/cc251fa399c1210994bd6e505109ddd5272ae1a4...2f3dd0d9092d4ba075a6df6c8e5e0556dcf049c5

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/cc251fa399c1210994bd6e505109ddd5272ae1a4...2f3dd0d9092d4ba075a6df6c8e5e0556dcf049c5
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/20230712/2a5e1bb7/attachment.htm>


More information about the rb-commits mailing list