[Git][reproducible-builds/diffoscope][master] Fix ignoring objdump tests on macOS
Mattia Rizzolo (@mattia)
gitlab at salsa.debian.org
Sun May 30 18:55:08 UTC 2021
Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope
Commits:
348c3af4 by Keith Smiley at 2021-05-30T18:42:30+00:00
Fix ignoring objdump tests on macOS
macOS has a version of objdump but it doesn't support `--info` or elf
binaries. Previously the tests would fail instantly when `--info` was
passed.
- - - - -
1 changed file:
- tests/utils/tools.py
Changes:
=====================================
tests/utils/tools.py
=====================================
@@ -177,11 +177,14 @@ def skip_if_binutils_does_not_support_x86():
@functools.lru_cache()
def get_supported_elf_formats():
- return set(
- subprocess.check_output(("objdump", "--info"))
- .decode("utf-8")
- .splitlines()
- )
+ try:
+ return set(
+ subprocess.check_output(("objdump", "--info"))
+ .decode("utf-8")
+ .splitlines()
+ )
+ except (subprocess.CalledProcessError, FileNotFoundError):
+ return set()
def module_is_not_importable(x):
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/348c3af480937be15fee253e2b3e337ef8975a96
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/348c3af480937be15fee253e2b3e337ef8975a96
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/20210530/75620770/attachment.htm>
More information about the rb-commits
mailing list