Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
diffoscope
Commits
71ce125a
Commit
71ce125a
authored
4 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Fix FIT tests in buster.
parent
a3fbad45
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/comparators/test_fit.py
+15
-6
15 additions, 6 deletions
tests/comparators/test_fit.py
with
15 additions
and
6 deletions
tests/comparators/test_fit.py
+
15
−
6
View file @
71ce125a
...
...
@@ -26,13 +26,22 @@ from diffoscope.comparators.fit import FlattenedImageTreeFile
from
diffoscope.comparators.utils.specialize
import
specialize
from
..utils.data
import
data
,
assert_diff
,
load_fixture
from
..utils.tools
import
skip_unless_tools_exist
from
..utils.tools
import
skip_unless_tools_exist
,
skip_unless_tool_is_at_least
from
..utils.nonexisting
import
assert_non_existing
cpio1
=
load_fixture
(
"
test1.cpio
"
)
cpio2
=
load_fixture
(
"
test2.cpio
"
)
def
dumpimage_version
():
return
(
subprocess
.
check_output
((
"
dumpimage
"
,
"
-V
"
))
.
decode
(
"
utf-8
"
)
.
strip
()
.
split
(
"
"
)[
-
1
]
)
def
fit_fixture
(
prefix
,
entrypoint
):
@pytest.fixture
def
uboot_fit
(
tmp_path
):
...
...
@@ -98,21 +107,21 @@ def nested_differences(uboot_fit1, uboot_fit2):
return
uboot_fit1
.
compare
(
uboot_fit2
).
details
[
1
].
details
@skip_unless_tool
s_exi
st
(
"
dumpimage
"
)
@skip_unless_tool
_is_at_lea
st
(
"
dumpimage
"
,
dumpimage_version
,
"
2021.01
"
)
@skip_unless_tools_exist
(
"
fdtdump
"
)
def
test_file_differences
(
differences
):
assert_diff
(
differences
[
0
],
"
fit_expected_diff
"
)
@skip_unless_tools_exist
(
"
cpio
"
)
@skip_unless_tool
s_exi
st
(
"
dumpimage
"
)
@skip_unless_tool
_is_at_lea
st
(
"
dumpimage
"
,
dumpimage_version
,
"
2021.01
"
)
@skip_unless_tools_exist
(
"
fdtdump
"
)
def
test_nested_listing
(
nested_differences
):
assert_diff
(
nested_differences
[
0
],
"
cpio_listing_expected_diff
"
)
@skip_unless_tools_exist
(
"
cpio
"
)
@skip_unless_tool
s_exi
st
(
"
dumpimage
"
)
@skip_unless_tool
_is_at_lea
st
(
"
dumpimage
"
,
dumpimage_version
,
"
2021.01
"
)
@skip_unless_tools_exist
(
"
fdtdump
"
)
def
test_nested_symlink
(
nested_differences
):
assert
nested_differences
[
1
].
source1
==
"
dir/link
"
...
...
@@ -121,7 +130,7 @@ def test_nested_symlink(nested_differences):
@skip_unless_tools_exist
(
"
cpio
"
)
@skip_unless_tool
s_exi
st
(
"
dumpimage
"
)
@skip_unless_tool
_is_at_lea
st
(
"
dumpimage
"
,
dumpimage_version
,
"
2021.01
"
)
@skip_unless_tools_exist
(
"
fdtdump
"
)
def
test_nested_compressed_files
(
nested_differences
):
assert
nested_differences
[
2
].
source1
==
"
dir/text
"
...
...
@@ -130,7 +139,7 @@ def test_nested_compressed_files(nested_differences):
@skip_unless_tools_exist
(
"
cpio
"
)
@skip_unless_tool
s_exi
st
(
"
dumpimage
"
)
@skip_unless_tool
_is_at_lea
st
(
"
dumpimage
"
,
dumpimage_version
,
"
2021.01
"
)
@skip_unless_tools_exist
(
"
fdtdump
"
)
def
test_compare_non_existing
(
monkeypatch
,
uboot_fit1
):
assert_non_existing
(
monkeypatch
,
uboot_fit1
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment