[Git][reproducible-builds/diffoscope][master] 2 commits: Use assert_diff (over get_data) in FIT/U-boot comparator.
Chris Lamb
gitlab at salsa.debian.org
Wed Feb 10 16:39:47 UTC 2021
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
4d0c4e48 by Chris Lamb at 2021-02-10T16:38:00+00:00
Use assert_diff (over get_data) in FIT/U-boot comparator.
- - - - -
e70171a7 by Chris Lamb at 2021-02-10T16:38:41+00:00
Update fit_expected_diff.
May break with device-tree-compiler in buster.
- - - - -
2 changed files:
- tests/comparators/test_fit.py
- tests/data/fit_expected_diff
Changes:
=====================================
tests/comparators/test_fit.py
=====================================
@@ -25,7 +25,7 @@ from diffoscope.comparators.binary import FilesystemFile
from diffoscope.comparators.fit import FlattenedImageTreeFile
from diffoscope.comparators.utils.specialize import specialize
-from ..utils.data import data, get_data, load_fixture
+from ..utils.data import data, assert_diff, load_fixture
from ..utils.tools import skip_unless_tools_exist
from ..utils.nonexisting import assert_non_existing
@@ -101,16 +101,14 @@ def nested_differences(uboot_fit1, uboot_fit2):
@skip_unless_tools_exist("dumpimage")
@skip_unless_tools_exist("fdtdump")
def test_file_differences(differences):
- expected_diff = get_data("fit_expected_diff")
- assert differences[0].unified_diff == expected_diff
+ assert_diff(differences[0], "fit_expected_diff")
@skip_unless_tools_exist("cpio")
@skip_unless_tools_exist("dumpimage")
@skip_unless_tools_exist("fdtdump")
def test_nested_listing(nested_differences):
- expected_diff = get_data("cpio_listing_expected_diff")
- assert nested_differences[0].unified_diff == expected_diff
+ assert_diff(nested_differences[0], "cpio_listing_expected_diff")
@skip_unless_tools_exist("cpio")
@@ -119,8 +117,7 @@ def test_nested_listing(nested_differences):
def test_nested_symlink(nested_differences):
assert nested_differences[1].source1 == "dir/link"
assert nested_differences[1].comment == "symlink"
- expected_diff = get_data("symlink_expected_diff")
- assert nested_differences[1].unified_diff == expected_diff
+ assert_diff(nested_differences[1], "symlink_expected_diff")
@skip_unless_tools_exist("cpio")
@@ -129,8 +126,7 @@ def test_nested_symlink(nested_differences):
def test_nested_compressed_files(nested_differences):
assert nested_differences[2].source1 == "dir/text"
assert nested_differences[2].source2 == "dir/text"
- expected_diff = get_data("text_ascii_expected_diff")
- assert nested_differences[2].unified_diff == expected_diff
+ assert_diff(nested_differences[2], "text_ascii_expected_diff")
@skip_unless_tools_exist("cpio")
=====================================
tests/data/fit_expected_diff
=====================================
@@ -1,4 +1,4 @@
-@@ -5,13 +5,13 @@
+@@ -5,15 +5,15 @@
Created: Fri Jan 1 00:00:00 2021
Type: RAMDisk Image
Compression: uncompressed
@@ -8,6 +8,9 @@
Load Address: 0x00000000
- Entry Point: 0x00001000
+ Entry Point: 0x00002000
+ Hash algo: crc32
+- Hash value: 347161a5
++ Hash value: c63c4a06
Default Configuration: 'conf-1'
Configuration 0 (conf-1)
Description: unavailable
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/7010eaddbb75c78e30397effe25d05d2f7e935ba...e70171a71a1fd9201eb1d64fda473551ab0edb93
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/7010eaddbb75c78e30397effe25d05d2f7e935ba...e70171a71a1fd9201eb1d64fda473551ab0edb93
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/20210210/67a98e4e/attachment.htm>
More information about the rb-commits
mailing list