diff options
author | Kristian Klausen <kristian@klausen.dk> | 2021-09-03 15:52:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-06 09:49:50 +0100 |
commit | 73384ac936041e0122e8911d6c82a398df52b85b (patch) | |
tree | 3ee18606b6afff7bd70df850dd73619909e73ecf /meta/lib | |
parent | f97a29af632a4584b7051162b2403756cd869c7c (diff) | |
download | poky-73384ac936041e0122e8911d6c82a398df52b85b.tar.gz |
wic: Add extra-space argument
This allows extra space to be added after the last partition and is
especially useful when free space is needed for ex: adding partitions on
first boot with ex: systemd-repart[1] and the image is tested in QEMU.
[1] https://www.freedesktop.org/software/systemd/man/systemd-repart.html
(From OE-Core rev: f81b188bcf5aa18746fd622eb7b5c0dcb0b5c93d)
Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 3b4143414f..dc7b9e637e 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -744,6 +744,17 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc | |||
744 | % (wks_file, self.resultdir), ignore_status=True).status) | 744 | % (wks_file, self.resultdir), ignore_status=True).status) |
745 | os.remove(wks_file) | 745 | os.remove(wks_file) |
746 | 746 | ||
747 | def test_extra_space(self): | ||
748 | """Test --extra-space wks option.""" | ||
749 | extraspace = 1024**3 | ||
750 | runCmd("wic create wictestdisk " | ||
751 | "--image-name core-image-minimal " | ||
752 | "--extra-space %i -o %s" % (extraspace ,self.resultdir)) | ||
753 | wicout = glob(self.resultdir + "wictestdisk-*.direct") | ||
754 | self.assertEqual(1, len(wicout)) | ||
755 | size = os.path.getsize(wicout[0]) | ||
756 | self.assertTrue(size > extraspace) | ||
757 | |||
747 | class Wic2(WicTestCase): | 758 | class Wic2(WicTestCase): |
748 | 759 | ||
749 | def test_bmap_short(self): | 760 | def test_bmap_short(self): |