summary refs log tree commit diff
path: root/pkgs/tools/misc/diffoscope/fix-test_fit.patch
blob: cd275ea9e91cd563851fa67505b46be1ce58743e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From f1e9fa32c925fe7fb3cd825a02dcff52d305d845 Mon Sep 17 00:00:00 2001
From: Andrew Marshall <andrew@johnandrewmarshall.com>
Date: Mon, 28 Aug 2023 19:03:38 -0400
Subject: [PATCH] Fix test_fit with file 5.45

See also 435a8fe9a201a7e74e705e06cc56b66fa6cb4af9.
---
 tests/comparators/test_fit.py | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/tests/comparators/test_fit.py b/tests/comparators/test_fit.py
index d8478c00..47258a3e 100644
--- a/tests/comparators/test_fit.py
+++ b/tests/comparators/test_fit.py
@@ -27,7 +27,11 @@
 from diffoscope.comparators.utils.specialize import specialize
 
 from ..utils.data import data, assert_diff, load_fixture
-from ..utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least
+from ..utils.tools import (
+    skip_unless_file_version_is_at_least,
+    skip_unless_tool_is_at_least,
+    skip_unless_tools_exist,
+)
 from ..utils.nonexisting import assert_non_existing
 
 cpio1 = load_fixture("test1.cpio")
@@ -124,19 +128,21 @@ def test_nested_listing(nested_differences):
 @skip_unless_tools_exist("cpio")
 @skip_unless_tool_is_at_least("dumpimage", dumpimage_version, "2021.01")
 @skip_unless_tools_exist("fdtdump")
+@skip_unless_file_version_is_at_least("5.45")
 def test_nested_symlink(nested_differences):
-    assert nested_differences[1].source1 == "dir/link"
-    assert nested_differences[1].comment == "symlink"
-    assert_diff(nested_differences[1], "symlink_expected_diff")
+    assert nested_differences[2].source1 == "dir/link"
+    assert nested_differences[2].comment == "symlink"
+    assert_diff(nested_differences[2], "symlink_expected_diff")
 
 
 @skip_unless_tools_exist("cpio")
 @skip_unless_tool_is_at_least("dumpimage", dumpimage_version, "2021.01")
 @skip_unless_tools_exist("fdtdump")
+@skip_unless_file_version_is_at_least("5.45")
 def test_nested_compressed_files(nested_differences):
-    assert nested_differences[2].source1 == "dir/text"
-    assert nested_differences[2].source2 == "dir/text"
-    assert_diff(nested_differences[2], "text_ascii_expected_diff")
+    assert nested_differences[3].source1 == "dir/text"
+    assert nested_differences[3].source2 == "dir/text"
+    assert_diff(nested_differences[3], "text_ascii_expected_diff")
 
 
 @skip_unless_tools_exist("cpio")
-- 
2.41.0