]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa: wic: Add test for --no-table option
authorMarkus Niebel <Markus.Niebel@ew.tq-group.com>
Mon, 21 Aug 2023 10:15:44 +0000 (12:15 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Aug 2023 08:40:55 +0000 (09:40 +0100)
Add basic test for the --no-table wic part option.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/wic.py

index a3c6deb5aa32e0e4ef235cbe29a4a7883f5110cf..aa61349ed126fa091a906b4bfb120bc2199475ca 100644 (file)
@@ -731,6 +731,23 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc
         size = os.path.getsize(wicout[0])
         self.assertTrue(size > extraspace)
 
+    def test_no_table(self):
+        """Test --no-table wks option."""
+        wks_file = 'temp.wks'
+
+        # Absolute argument.
+        with open(wks_file, 'w') as wks:
+            wks.write("part testspace --no-table --fixed-size 16k --offset 4080k")
+        runCmd("wic create %s --image-name core-image-minimal -o %s" % (wks_file, self.resultdir))
+
+        wicout = glob(os.path.join(self.resultdir, "*.*"))
+
+        self.assertEqual(1, len(wicout))
+        size = os.path.getsize(wicout[0])
+        self.assertEqual(size, 4 * 1024 * 1024)
+
+        os.remove(wks_file)
+
 class Wic2(WicTestCase):
 
     def test_bmap_short(self):