summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2019-01-16 15:45:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-16 15:35:07 +0000
commit83ade722e1a6903f382787fa015c62b0f35d4417 (patch)
tree9b94430fca176b053a3def702b7722f26e41cd59 /meta/lib
parent024b5af5481f47b636160172ca80993ddf5aaccb (diff)
downloadpoky-83ade722e1a6903f382787fa015c62b0f35d4417.tar.gz
selftest/wic: update test case test_qemu
This test case boots the image in qemu and checks for mounted partitions. But the outputs of mount are different between sysvinit and systemd: sysvinit: /dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt systemd: /dev/sda1 /boot\r\n/dev/sda2 /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt So check mounted partitions by egrep rather than check output of runqemu. (From OE-Core rev: 8e3311d45ec68d74e934e966f67cf5102634981c) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 36ee5e5a14..79925f942f 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -625,9 +625,11 @@ class Wic2(WicTestCase):
625 self.remove_config(config) 625 self.remove_config(config)
626 626
627 with runqemu('wic-image-minimal', ssh=False) as qemu: 627 with runqemu('wic-image-minimal', ssh=False) as qemu:
628 cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort" 628 cmd = "mount | grep '^/dev/' | cut -f1,3 -d ' ' | egrep -c -e '/dev/sda1 /boot' " \
629 "-e '/dev/root /|/dev/sda2 /' -e '/dev/sda3 /media' -e '/dev/sda4 /mnt'"
629 status, output = qemu.run_serial(cmd) 630 status, output = qemu.run_serial(cmd)
630 self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt') 631 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
632 self.assertEqual(output, '4')
631 cmd = "grep UUID= /etc/fstab" 633 cmd = "grep UUID= /etc/fstab"
632 status, output = qemu.run_serial(cmd) 634 status, output = qemu.run_serial(cmd)
633 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) 635 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))