diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-03-22 15:42:34 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-23 13:19:49 +0000 |
| commit | a247553bb3873590c53f654bfd5310fa5ffdb8ea (patch) | |
| tree | fc65cb08d8c1f26a42fd40aaa2bacc5349ff720e /meta/lib | |
| parent | 32c59203cef92d8ee79e03c87a70636301f50154 (diff) | |
| download | poky-a247553bb3873590c53f654bfd5310fa5ffdb8ea.tar.gz | |
oe-selftest: add test_rawcopy_plugin test case
This test case builds wic image using rawcopy plugin
running wic directly.
[YOCTO #10618]
(From OE-Core rev: acbeaa37554f3546b036ff8ef9aebfe00f2537c6)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
| -rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 327dd073ca..ee633f851a 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py | |||
| @@ -701,3 +701,19 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
| 701 | status, output = qemu.run_serial(cmd) | 701 | status, output = qemu.run_serial(cmd) |
| 702 | self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) | 702 | self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output)) |
| 703 | self.assertEqual(output, '2') | 703 | self.assertEqual(output, '2') |
| 704 | |||
| 705 | def test_rawcopy_plugin(self): | ||
| 706 | """Test rawcopy plugin""" | ||
| 707 | img = 'core-image-minimal' | ||
| 708 | machine = get_bb_var('MACHINE', img) | ||
| 709 | with NamedTemporaryFile("w", suffix=".wks") as wks: | ||
| 710 | wks.writelines(['part /boot --active --source bootimg-pcbios\n', | ||
| 711 | 'part / --source rawcopy --sourceparams="file=%s-%s.ext4" --use-uuid\n'\ | ||
| 712 | % (img, machine), | ||
| 713 | 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n']) | ||
| 714 | wks.flush() | ||
| 715 | cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) | ||
| 716 | self.assertEqual(0, runCmd(cmd).status) | ||
| 717 | wksname = os.path.splitext(os.path.basename(wks.name))[0] | ||
| 718 | out = glob(self.resultdir + "%s-*direct" % wksname) | ||
| 719 | self.assertEqual(1, len(out)) | ||
