[diffoscope] 01/01: tests: skip rlib tests if the "nm" tool is missing
Mattia Rizzolo
mattia at debian.org
Sun Sep 18 15:10:44 CEST 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository diffoscope.
commit 1d7bea16d0aade51ab6b7b26aa2e6766d50de4d6
Author: Mattia Rizzolo <mattia at debian.org>
Date: Sun Sep 18 13:10:22 2016 +0000
tests: skip rlib tests if the "nm" tool is missing
Closes: #837742
---
tests/comparators/test_rlib.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py
index 1ed07cb..f132bef 100644
--- a/tests/comparators/test_rlib.py
+++ b/tests/comparators/test_rlib.py
@@ -25,7 +25,7 @@ from diffoscope.comparators.ar import ArFile
from diffoscope.comparators.utils import diff_ignore_line_numbers
from utils import skip_unless_tools_exist, skip_unless_tool_is_older_than, \
- data, load_fixture, assert_non_existing
+ skip_unless_tools_exist, data, load_fixture, assert_non_existing
rlib1 = load_fixture(data('test1.rlib'))
rlib2 = load_fixture(data('test2.rlib'))
@@ -44,21 +44,25 @@ def test_no_differences(rlib1):
def differences(rlib1, rlib2):
return rlib1.compare(rlib2).details
+ at skip_unless_tools_exist('nm')
def test_num_items(differences):
assert len(differences) == 4
+ at skip_unless_tools_exist('nm')
def test_item0_armap(differences):
assert differences[0].source1 == 'nm -s {}'
assert differences[0].source2 == 'nm -s {}'
expected_diff = open(data('rlib_armap_expected_diff')).read()
assert differences[0].unified_diff == expected_diff
+ at skip_unless_tools_exist('nm')
def test_item1_elf(differences):
assert differences[1].source1 == 'alloc_system-d16b8f0e.0.o'
assert differences[1].source2 == 'alloc_system-d16b8f0e.0.o'
expected_diff = open(data('rlib_elf_expected_diff')).read()
assert differences[1].details[0].unified_diff == expected_diff
+ at skip_unless_tools_exist('nm')
def test_item2_rust_metadata_bin(differences):
assert differences[2].source1 == 'rust.metadata.bin'
assert differences[2].source2 == 'rust.metadata.bin'
@@ -72,5 +76,6 @@ def test_item3_deflate_llvm_bitcode(differences):
actual_diff = differences[3].details[0].details[1].unified_diff
assert diff_ignore_line_numbers(actual_diff) == diff_ignore_line_numbers(expected_diff)
+ at skip_unless_tools_exist('nm')
def test_compare_non_existing(monkeypatch, rlib1):
assert_non_existing(monkeypatch, rlib1)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list