summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/wic.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index a569fbf747..dd3207528e 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -276,3 +276,16 @@ class Wic(oeSelfTest):
276 status, output = qemu.run_serial(command) 276 status, output = qemu.run_serial(command)
277 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output)) 277 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
278 self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt') 278 self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
279
280 def test_sparseness(self):
281 """Test that assembled images are sparse; apparent size > disk usage"""
282 self.assertEqual(0, runCmd("wic create directdisk "
283 "--image-name core-image-minimal").status)
284 images = glob(self.resultdir + "directdisk-*.direct")
285 self.assertEqual(1, len(images))
286
287 imagestat = os.stat(images.pop())
288 # st_blocks is the "number of 512-byte blocks allocated for file"
289 used = imagestat.st_blocks*512
290 apparent = imagestat.st_size
291 self.assertLess(used, apparent)