aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-03-22 15:42:34 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 15:07:37 +0000
commitacbeaa37554f3546b036ff8ef9aebfe00f2537c6 (patch)
tree5d3f29b193501eab6720c6185b621b6246dee63c
parenta6dbe6e1630067164881c8d7efb44cb650cd043c (diff)
downloadopenembedded-core-contrib-acbeaa37554f3546b036ff8ef9aebfe00f2537c6.tar.gz
openembedded-core-contrib-acbeaa37554f3546b036ff8ef9aebfe00f2537c6.tar.bz2
openembedded-core-contrib-acbeaa37554f3546b036ff8ef9aebfe00f2537c6.zip
oe-selftest: add test_rawcopy_plugin test case
This test case builds wic image using rawcopy plugin running wic directly. [YOCTO #10618] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/wic.py16
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
status, output = qemu.run_serial(cmd)
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
self.assertEqual(output, '2')
+
+ def test_rawcopy_plugin(self):
+ """Test rawcopy plugin"""
+ img = 'core-image-minimal'
+ machine = get_bb_var('MACHINE', img)
+ with NamedTemporaryFile("w", suffix=".wks") as wks:
+ wks.writelines(['part /boot --active --source bootimg-pcbios\n',
+ 'part / --source rawcopy --sourceparams="file=%s-%s.ext4" --use-uuid\n'\
+ % (img, machine),
+ 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n'])
+ wks.flush()
+ cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+ self.assertEqual(0, runCmd(cmd).status)
+ wksname = os.path.splitext(os.path.basename(wks.name))[0]
+ out = glob(self.resultdir + "%s-*direct" % wksname)
+ self.assertEqual(1, len(out))