[OE-core] [PATCH] wic: update test case test_qemu

Kang Kai Kai.Kang at windriver.com
Mon Jan 14 02:29:48 UTC 2019


On 2019/1/11 下午9:15, Burton, Ross wrote:
> I'm wondering what the point of checking the output of mount is.  If 
> we're just checking that the image booted then the grep is sufficient 
> right?


If just checking the wic image has been booted successfully, I think 
grep /boot is sufficient. V2 will be sent.

--Kai



>
> Ross
>
> On Fri, 11 Jan 2019 at 09:22, Kang Kai <Kai.Kang at windriver.com 
> <mailto:Kai.Kang at windriver.com>> wrote:
>
>     On 2019/1/4 上午10:49, kai.kang at windriver.com
>     <mailto:kai.kang at windriver.com> wrote:
>     > From: Kai Kang <kai.kang at windriver.com
>     <mailto:kai.kang at windriver.com>>
>     >
>     > It checks output of mount in wic test case test_qemu. But the
>     outputs are
>     > different between sysvinit and systemd. Add assertion for systemd.
>     >
>     > Signed-off-by: Kai Kang <kai.kang at windriver.com
>     <mailto:kai.kang at windriver.com>>
>     > ---
>     >   meta/lib/oeqa/selftest/cases/wic.py | 5 ++++-
>     >   1 file changed, 4 insertions(+), 1 deletion(-)
>     >
>     > diff --git a/meta/lib/oeqa/selftest/cases/wic.py
>     b/meta/lib/oeqa/selftest/cases/wic.py
>     > index 36ee5e5a14..a6bc566166 100644
>     > --- a/meta/lib/oeqa/selftest/cases/wic.py
>     > +++ b/meta/lib/oeqa/selftest/cases/wic.py
>     > @@ -627,7 +627,10 @@ class Wic2(WicTestCase):
>     >           with runqemu('wic-image-minimal', ssh=False) as qemu:
>     >               cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
>     >               status, output = qemu.run_serial(cmd)
>     > -            self.assertEqual(output, '/dev/root /\r\n/dev/sda1
>     /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
>     > +            if 'sysvinit' in get_bb_var('DISTRO_FEATURES'):
>     > +                self.assertEqual(output, '/dev/root
>     /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
>     > +            else:
>     > +                self.assertEqual(output, '/dev/sda1
>     /boot\r\n/dev/sda2 /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
>     >               cmd = "grep UUID= /etc/fstab"
>     >               status, output = qemu.run_serial(cmd)
>     >               self.assertEqual(1, status, 'Failed to run command
>     "%s": %s' % (cmd, output))
>
>
>     Ping
>
>     -- 
>     Kai Kang
>
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core at lists.openembedded.org
>     <mailto:Openembedded-core at lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

-- 
Kai Kang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190114/7b737bac/attachment.html>


More information about the Openembedded-core mailing list