[diffoscope] 04/04: Support newer versions of cbfstool to avoid test failure. (Closes: #856446)
Chris Lamb
chris at chris-lamb.co.uk
Thu Mar 2 11:29:46 CET 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch experimental
in repository diffoscope.
commit d6c59540481ca46d050158538abb154fce5ebce6
Author: Chris Lamb <lamby at debian.org>
Date: Thu Mar 2 10:29:19 2017 +0000
Support newer versions of cbfstool to avoid test failure. (Closes: #856446)
Newer versions of cbfstool do not create a "legacy header" and thus is
missing from the diff.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
tests/comparators/test_cbfs.py | 9 +++++++--
tests/data/cbfs_listing_no_legacy_header_expected_diff | 6 ++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/tests/comparators/test_cbfs.py b/tests/comparators/test_cbfs.py
index 1713b18..33f045b 100644
--- a/tests/comparators/test_cbfs.py
+++ b/tests/comparators/test_cbfs.py
@@ -117,8 +117,13 @@ def differences(rom1, rom2):
@skip_unless_tools_exist('cbfstool')
def test_listing(differences):
- expected_diff = get_data('cbfs_listing_expected_diff')
- assert differences[0].unified_diff == expected_diff
+ # Newer versions of cbfstool do not create the "legacy" header by default
+ # and thus is missing from the diff.
+
+ assert differences[0].unified_diff in (
+ get_data('cbfs_listing_expected_diff'),
+ get_data('cbfs_listing_no_legacy_header_expected_diff'),
+ )
@skip_unless_tools_exist('cbfstool')
diff --git a/tests/data/cbfs_listing_no_legacy_header_expected_diff b/tests/data/cbfs_listing_no_legacy_header_expected_diff
new file mode 100644
index 0000000..b43784c
--- /dev/null
+++ b/tests/data/cbfs_listing_no_legacy_header_expected_diff
@@ -0,0 +1,6 @@
+@@ -1,3 +1,3 @@
+ Name Offset Type Size
+-text 0x0 raw 446
+-(empty) 0x200 null 32152
++text 0x0 raw 671
++(empty) 0x300 null 31896
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list