diff options
-rw-r--r-- | meta-selftest/recipes-test/delay/delay.bb | 12 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/buildoptions.py | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/meta-selftest/recipes-test/delay/delay.bb b/meta-selftest/recipes-test/delay/delay.bb new file mode 100644 index 0000000000..f92d3d99e2 --- /dev/null +++ b/meta-selftest/recipes-test/delay/delay.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Recipe with a fixed delay task" | ||
2 | DESCRIPTION = "Contains a delay task to be used to for testing." | ||
3 | LICENSE = "MIT" | ||
4 | |||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | EXCLUDE_FROM_WORLD = "1" | ||
7 | |||
8 | do_delay() { | ||
9 | sleep 5 | ||
10 | } | ||
11 | do_delay[nostamp] = "1" | ||
12 | addtask delay \ No newline at end of file | ||
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py index c3c90a0b0d..f234bac051 100644 --- a/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py | |||
@@ -59,15 +59,15 @@ class DiskMonTest(OESelftestTestCase): | |||
59 | @OETestID(277) | 59 | @OETestID(277) |
60 | def test_stoptask_behavior(self): | 60 | def test_stoptask_behavior(self): |
61 | self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"') | 61 | self.write_config('BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100000G,100K"') |
62 | res = bitbake("m4", ignore_status = True) | 62 | res = bitbake("delay -c delay", ignore_status = True) |
63 | self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg = "Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output) | 63 | self.assertTrue('ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!' in res.output, msg = "Tasks should have stopped. Disk monitor is set to STOPTASK: %s" % res.output) |
64 | self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output)) | 64 | self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output)) |
65 | self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"') | 65 | self.write_config('BB_DISKMON_DIRS = "ABORT,${TMPDIR},100000G,100K"') |
66 | res = bitbake("m4", ignore_status = True) | 66 | res = bitbake("delay -c delay", ignore_status = True) |
67 | self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output, "Tasks should have been aborted immediatelly. Disk monitor is set to ABORT: %s" % res.output) | 67 | self.assertTrue('ERROR: Immediately abort since the disk space monitor action is "ABORT"!' in res.output, "Tasks should have been aborted immediatelly. Disk monitor is set to ABORT: %s" % res.output) |
68 | self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output)) | 68 | self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output)) |
69 | self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"') | 69 | self.write_config('BB_DISKMON_DIRS = "WARN,${TMPDIR},100000G,100K"') |
70 | res = bitbake("m4") | 70 | res = bitbake("delay -c delay") |
71 | self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output) | 71 | self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output) |
72 | 72 | ||
73 | class SanityOptionsTest(OESelftestTestCase): | 73 | class SanityOptionsTest(OESelftestTestCase): |