diff options
Diffstat (limited to 'meta')
| -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)) | ||
