Message ID | 20230821101545.3351643-2-Markus.Niebel@ew.tq-group.com |
---|---|
State | Accepted, archived |
Commit | ad89d7e6039da2d79c1d55fe7fdc8bb9c235dacf |
Headers | show |
Series | [v2,1/2] oeqa: wic: Add test for --no-table option | expand |
Gentle ping. I added the Test case and resent the fix together with this test. Markus -------- Ursprüngliche Nachricht -------- Von: Markus Niebel <Markus.Niebel@ew.tq-group.com> An: openembedded-core@lists.openembedded.org Kopie: oss@ew.tq-group.com, Markus Niebel < Markus.Niebel@ew.tq-group.com> Betreff: [PATCH v2 1/2] oeqa: wic: Add test for --no-table option Datum: Mon, 21 Aug 2023 12:15:44 +0200 Add basic test for the --no-table wic part option. Signed-off-by: Markus Niebel < Markus.Niebel@ew.tq-group.com > --- v2: add this test case meta/lib/oeqa/selftest/cases/wic.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index a3c6deb5aa..aa61349ed1 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -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):
On Mon, 2023-10-16 at 12:20 +0200, Markus Niebel wrote: > Gentle ping. I added the Test case and resent the fix together with > this test. I think this did already merge: https://git.yoctoproject.org/poky/commit/?id=4a56d0cc9350d3a4b028077f534a6ffda412c006 ? Cheers, Richard
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index a3c6deb5aa..aa61349ed1 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -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):
Add basic test for the --no-table wic part option. Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> --- v2: add this test case meta/lib/oeqa/selftest/cases/wic.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)