]> code.ossystems Code Review - openembedded-core.git/commitdiff
selftest: DiskMonTest: use a high value for free space
authorStefan Stanacar <stefanx.stanacar@intel.com>
Fri, 11 Apr 2014 11:04:49 +0000 (14:04 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Apr 2014 10:41:03 +0000 (11:41 +0100)
Using the free space of the host works when
oe-selftest is the only build running, but if something else
on the host remove things this will fail (as seen on AB).
Using an absurdly high value should fix this.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/buildoptions.py

index 8ff40baddc33fe53746c68ff43897a79f30f8a13..27fc452e72a06392ace5ecd3c8691eeac94d17e0 100644 (file)
@@ -51,17 +51,15 @@ class ImageOptionsTests(oeSelfTest):
 class DiskMonTest(oeSelfTest):
 
     def test_stoptask_behavior(self):
-        result = runCmd("df -Pk %s" % os.getcwd())
-        size = result.output.split("\n")[1].split()[3]
-        self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},%sK,4510K"' % size)
+        self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"')
         res = bitbake("m4", ignore_status = True)
         self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output)
         self.assertEqual(res.status, 1)
-        self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},%sK,4510K"' % size)
+        self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"')
         res = bitbake("m4", ignore_status = True)
         self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output)
         self.assertEqual(res.status, 1)
-        self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},%sK,4510K"' % size)
+        self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"')
         res = bitbake("m4")
         self.assertTrue('WARNING: The free space' in res.output)