[oe-commits] Stefan Stanacar : selftest: DiskMonTest: use a high value for free space

git at git.openembedded.org git at git.openembedded.org
Sat Apr 19 15:25:39 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: b3bec1c6284ff3cca17ddfd6bef967fe8cb9d36f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=b3bec1c6284ff3cca17ddfd6bef967fe8cb9d36f

Author: Stefan Stanacar <stefanx.stanacar at intel.com>
Date:   Fri Apr 11 14:04:49 2014 +0300

selftest: DiskMonTest: use a high value for free space

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 at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/selftest/buildoptions.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 8ff40ba..27fc452 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -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)
 



More information about the Openembedded-commits mailing list