[Git][reproducible-builds/diffoscope][master] Update test to check specific contents of squashfs listing, otherwise it fails...

Chris Lamb (@lamby) gitlab at salsa.debian.org
Tue Aug 17 12:50:21 UTC 2021



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
ab780bf6 by Chris Lamb at 2021-08-17T13:49:40+01:00
Update test to check specific contents of squashfs listing, otherwise it fails depending on the test systems uid to username passwd(5) mapping.

- - - - -


2 changed files:

- tests/comparators/test_squashfs.py
- tests/data/squashfs_root_expected_diff


Changes:

=====================================
tests/comparators/test_squashfs.py
=====================================
@@ -22,7 +22,7 @@ import subprocess
 
 from diffoscope.comparators.squashfs import SquashfsFile
 
-from ..utils.data import load_fixture, assert_diff
+from ..utils.data import load_fixture, assert_diff, get_data
 from ..utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least
 from ..utils.nonexisting import assert_non_existing
 
@@ -97,4 +97,7 @@ def differences_root(squashfs1_root, squashfs2_root):
 
 @skip_unless_tools_exist("unsquashfs")
 def test_symlink_root(differences_root):
-    assert_diff(differences_root[1], "squashfs_root_expected_diff")
+    assert (
+        get_data("squashfs_root_expected_diff")
+        in differences_root[1].unified_diff
+    )


=====================================
tests/data/squashfs_root_expected_diff
=====================================
@@ -1,11 +1 @@
-@@ -1,7 +1,7 @@
- Parallel unsquashfs: Using 8 processors
- 3 inodes (3 blocks) to write
- 
--drwxr-xr-x lamby/lamby              51 2015-06-24 14:47 
--lrwxrwxrwx lamby/lamby               6 2015-06-24 14:47 /link -> broken
-+drwxr-xr-x lamby/lamby              51 2015-06-24 14:50 
-+lrwxrwxrwx lamby/lamby              13 2015-06-24 14:50 /link -> really-broken
  crw-r--r-- root/root             1,  3 2015-06-24 14:47 /null
---rw-r--r-- lamby/lamby             446 2015-06-24 14:49 /text
-+-rw-r--r-- lamby/lamby             671 2015-06-24 14:49 /text



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/ab780bf6ad6bfa0c88767827065d3fdba4fd3b32

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/ab780bf6ad6bfa0c88767827065d3fdba4fd3b32
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/20210817/f09f8d62/attachment.htm>


More information about the rb-commits mailing list