4 Commits

Author SHA1 Message Date
Sjoerd Simons
1b22166517 tests: templating: Add yaml anchors
Add some yaml anchors in the templating test to ensure those are
correctly handled. This is in preperation for switching the yaml
package.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-11-01 22:04:02 +01:00
Julien Massot
840b1df5c2 Add support for alternate sectorsize
Newer storage, such as UFS or NVMe disk, may not support the
default 512 sector size.

For these devices, the partition table and the partition offset
need to be aligned with sector size boundaries. The GPT partition
table is 34 sectors in length, so we can't have compatible disk images
between 512 and 4096 sector-size devices.

This patch introduces a major breakage with the {{ sector 64 }}
template.
At template processing, we can't guess the appropriate sector size
for the image since this value can be defined as a YAML header.
Instead of multiplying the sector number by the default 512 bytes
boundary, append a 's' suffix. This defers the work of computing
the value to the different Actions.
The 's' suffix is chosen to be compatible with parted (ImagePartition)
and support has been added to raw action.

Signed-off-by: Julien Massot <julien.massot@collabora.com>
2025-03-04 07:16:15 +01:00
Sjoerd Simons
bf30a29445 tests: Merge uuid5 test with general templating tests
Setting up the test fixtures takes quite some time, so merge the uuid5
tests into the templating tests. Also simplify it somewhat by just using
`test` rather then diff

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2024-01-15 10:37:59 +00:00
Sjoerd Simons
94d061083e Add test for more templating functions
Renaming the escaping test to a general templating test and add tests
for a selection of functions from sprig-slim as well as the builtin
sector function

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2023-12-30 22:26:48 +00:00