mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
Revert "oeqa/selftest/wic: add test case for sparse images"
This reverts commit 43150ab7ec.
(From OE-Core rev: d7d06cd7390fa02f866ba5414efc3924ceecfb4e)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
45c0763fc9
commit
e80800e005
@@ -276,16 +276,3 @@ class Wic(oeSelfTest):
|
|||||||
status, output = qemu.run_serial(command)
|
status, output = qemu.run_serial(command)
|
||||||
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
|
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
|
||||||
self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
|
self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
|
||||||
|
|
||||||
def test_sparseness(self):
|
|
||||||
"""Test that assembled images are sparse; apparent size > disk usage"""
|
|
||||||
self.assertEqual(0, runCmd("wic create directdisk "
|
|
||||||
"--image-name core-image-minimal").status)
|
|
||||||
images = glob(self.resultdir + "directdisk-*.direct")
|
|
||||||
self.assertEqual(1, len(images))
|
|
||||||
|
|
||||||
imagestat = os.stat(images.pop())
|
|
||||||
# st_blocks is the "number of 512-byte blocks allocated for file"
|
|
||||||
used = imagestat.st_blocks*512
|
|
||||||
apparent = imagestat.st_size
|
|
||||||
self.assertLess(used, apparent)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user