[diffoscope] [PATCH] skip rlib test if llvm-dis tool is missing

anthraxx levente at leventepolyak.net
Sat Aug 13 04:32:53 CEST 2016


---
 tests/comparators/test_rlib.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py
index bfba4a1..3bc89c0 100644
--- a/tests/comparators/test_rlib.py
+++ b/tests/comparators/test_rlib.py
@@ -28,6 +28,7 @@ from diffoscope.comparators.llvm import LlvmBitCodeFile
 from diffoscope.comparators.rust import RustObjectFile
 from diffoscope.comparators.utils import diff_ignore_line_numbers
 from diffoscope.config import Config
+from conftest import tool_missing
 
 TEST_FILE1_PATH = os.path.join(os.path.dirname(__file__), '../data/test1.rlib')
 TEST_FILE2_PATH = os.path.join(os.path.dirname(__file__), '../data/test2.rlib')
@@ -61,6 +62,7 @@ def test_item1_rust_metadata_bin(differences):
     assert differences[1].source1 == 'rust.metadata.bin'
     assert differences[1].source2 == 'rust.metadata.bin'
 
+ at pytest.mark.skipif(tool_missing('llvm-dis'), reason='missing llvm-dis')
 def test_item2_deflate_llvm_bitcode(differences):
     assert differences[2].source1 == 'alloc_system-d16b8f0e.0.bytecode.deflate'
     assert differences[2].source2 == 'alloc_system-d16b8f0e.0.bytecode.deflate'
-- 
2.9.2



More information about the diffoscope mailing list