-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for action:raw "offset", both bytes and sector
- Loading branch information
1 parent
201623d
commit cd2cd00
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{- $sector1 := 80 -}} | ||
{{- $offset1 := 40960 -}} | ||
{{- $sector2 := 82 -}} | ||
|
||
{{- $image_test := "test.img" -}} | ||
{{- $sample := "overlays/test/test-blk.raw" -}} | ||
|
||
architecture: arm64 | ||
|
||
actions: | ||
- action: overlay | ||
description: Deploy test block | ||
source: overlays/test | ||
|
||
- action: image-partition | ||
description: Create {{ $image_test }} | ||
imagename: {{ $image_test }} | ||
imagesize: {{ sector 128 }} | ||
partitiontype: msdos | ||
|
||
- action: raw | ||
description: Writing by bytes to {{ $image_test }}, offset {{ $offset1 }} | ||
origin: filesystem | ||
source: /test-blk.raw | ||
offset: {{ $offset1 }} | ||
|
||
- action: raw | ||
description: Writing by sector to {{ $image_test }}, offset {{ sector $sector2 }}, sector {{ $sector2 }} | ||
origin: filesystem | ||
source: /test-blk.raw | ||
offset: {{ sector $sector2 }} | ||
|
||
- action: run | ||
description: Run the test against the result image | ||
chroot: false | ||
postprocess: true | ||
command: > | ||
cd ${ARTIFACTDIR}; | ||
dd if={{ $image_test }} of=raw.byte bs=512 skip={{ $sector1 }} count=1 status=none; | ||
dd if={{ $image_test }} of=raw.sector bs=512 skip={{ $sector2 }} count=1 status=none; | ||
diff -s ${RECIPEDIR}/{{ $sample }} raw.byte || exit 1; | ||
diff -s ${RECIPEDIR}/{{ $sample }} raw.sector || exit 2; |