summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-12-13 22:20:26 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-18 18:03:58 +0000
commitd0de33c5d4c33a212e6ae9d312f780dc7526332a (patch)
tree497d13034c67425f662414549b8c6849ddc2da7f /meta/lib/oeqa
parent9ebc8301965b6b0aedc1d0cb8a9bc3e4893f2592 (diff)
downloadpoky-d0de33c5d4c33a212e6ae9d312f780dc7526332a.tar.gz
meta-selftest: wic: Add test for --use-uuid / --fsuuid
- Mount a '/media' partition to wic-image-minimal.wks with a known UUID. - In test_qemu, sort our output from checking the output of 'mount' as it may not be stable. Also, do not check the exit code as passing any output to cut ensures a 0 exit code. - Check for a 'UUID=' line in /etc/fstab with out expected output. (From OE-Core rev: 6d9396b26218f3234701944f385d5c36face8121) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 651d575dc3..ccbc82ed9b 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -634,10 +634,13 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
634 self.remove_config(config) 634 self.remove_config(config)
635 635
636 with runqemu('wic-image-minimal', ssh=False) as qemu: 636 with runqemu('wic-image-minimal', ssh=False) as qemu:
637 cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' '" 637 cmd = "mount |grep '^/dev/' | cut -f1,3 -d ' ' | sort"
638 status, output = qemu.run_serial(cmd)
639 self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt')
640 cmd = "grep UUID= /etc/fstab"
638 status, output = qemu.run_serial(cmd) 641 status, output = qemu.run_serial(cmd)
639 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) 642 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
640 self.assertEqual(output, '/dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /mnt') 643 self.assertEqual(output, 'UUID=2c71ef06-a81d-4735-9d3a-379b69c6bdba\t/media\text4\tdefaults\t0\t0')
641 644
642 @only_for_arch(['i586', 'i686', 'x86_64']) 645 @only_for_arch(['i586', 'i686', 'x86_64'])
643 @OETestID(1852) 646 @OETestID(1852)