test/py/tests: Move "setup_image" from test_ut.py to fs_helper.py
authorTom Rini <trini@konsulko.com>
Thu, 20 Mar 2025 13:59:24 +0000 (07:59 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 8 Apr 2025 19:51:09 +0000 (13:51 -0600)
commitfce92e304fcd8bdba522a43aeef12cc3b0b2df56
tree9015a2bda1933003d53ea796e97c0d05036cb554
parentf98d2a31271dd3357e4f13a77b62cd383bd3f09d
test/py/tests: Move "setup_image" from test_ut.py to fs_helper.py

The generic function in test_ut.py to create a disk image with partition
table can be useful outside of test_ut.py so move it to be available
more clearly.

To make this a bit more easily used library function, make use of
check_call directly rather than calling things though u_boot_utils. In
turn, to more easily handle stdin here, use the shell "printf" utility
to pass sfdisk the specification to create as we do not have an actual
file descriptor to use here.

Signed-off-by: Tom Rini <trini@konsulko.com>
test/py/tests/fs_helper.py
test/py/tests/test_ut.py