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
970d21a2
Commit
970d21a2
authored
3 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Use "file_version_is_lt" instead of literally accepting both versions of uimage expected diff.
parent
daf549e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#307540
passed
3 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/comparators/test_uimage.py
+8
-9
8 additions, 9 deletions
tests/comparators/test_uimage.py
with
8 additions
and
9 deletions
tests/comparators/test_uimage.py
+
8
−
9
View file @
970d21a2
...
...
@@ -23,8 +23,8 @@ from diffoscope.comparators.binary import FilesystemFile
from
diffoscope.comparators.uimage
import
UimageFile
from
diffoscope.comparators.utils.specialize
import
specialize
from
..utils.data
import
load_fixture
,
get_data
from
..utils.tools
import
skip_unless_tools_exist
from
..utils.data
import
load_fixture
,
get_data
,
assert_diff
from
..utils.tools
import
skip_unless_tools_exist
,
file_version_is_lt
from
..utils.nonexisting
import
assert_non_existing
cpio1
=
load_fixture
(
"
test1.cpio
"
)
...
...
@@ -98,13 +98,12 @@ def nested_differences(uboot_cpio1, uboot_cpio2):
def
test_file_differences
(
differences
):
# file-5.41 slightly changed output format by dropping leading 0x.
expected_diff_pre_5_41
=
get_data
(
"
uimage_expected_diff_pre_5_41
"
)
expected_diff
=
get_data
(
"
uimage_expected_diff
"
)
assert
differences
[
0
].
unified_diff
in
(
expected_diff
,
expected_diff_pre_5_41
,
)
filename
=
"
uimage_expected_diff
"
# file-5.41 slightly changed the output format by dropping leading 0x.
if
file_version_is_lt
(
"
5.41
"
):
filename
=
"
uimage_expected_diff_pre_5_41
"
assert_diff
(
differences
[
0
],
filename
)
@skip_unless_tools_exist
(
"
cpio
"
)
...
...
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