summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-09-25 11:18:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-27 13:02:16 +0100
commitc782ef5360c72414260eb64913668ffd05e0a2d4 (patch)
tree5de6779f7062c7f52a8d3833d0ed856a06aaa94f /meta/lib
parentdcc6498bb1f78d0f585b5ae15fd59c73f976ebf6 (diff)
downloadpoky-c782ef5360c72414260eb64913668ffd05e0a2d4.tar.gz
cases/bbtests.py: test_bitbake_g(): Check base-files rather than busybox
It checked whether busybox is in task-depends.dot after run "bitbake -g core-image-minimal", but busybox is not a must for core-image-minimal since it is configurable: VIRTUAL-RUNTIME_base-utils = "" VIRTUAL-RUNTIME_base-utils-syslog = "" VIRTUAL-RUNTIME_base-utils-hwclock = "" VIRTUAL-RUNTIME_login_manager = "shadow" VIRTUAL-RUNTIME_syslog = "" So the case may fail when busybox is not present, check base-files which is more reliable. (From OE-Core rev: f73676b07f6d8a4573a5f46c3e082831b34b7d18) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index 8e59bafae3..9461c7ed14 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -118,11 +118,12 @@ class BitbakeTests(OESelftestTestCase):
118 self.assertIn(task, result.output, msg="Couldn't find %s task.") 118 self.assertIn(task, result.output, msg="Couldn't find %s task.")
119 119
120 def test_bitbake_g(self): 120 def test_bitbake_g(self):
121 result = bitbake('-g core-image-minimal') 121 recipe = 'base-files'
122 result = bitbake('-g %s' % recipe)
122 for f in ['pn-buildlist', 'task-depends.dot']: 123 for f in ['pn-buildlist', 'task-depends.dot']:
123 self.addCleanup(os.remove, f) 124 self.addCleanup(os.remove, f)
124 self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg = "No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output) 125 self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg = "No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output)
125 self.assertTrue('busybox' in ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')), msg = "No \"busybox\" dependency found in task-depends.dot file.") 126 self.assertTrue(recipe in ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')), msg = "No \"%s\" dependency found in task-depends.dot file." % recipe)
126 127
127 def test_image_manifest(self): 128 def test_image_manifest(self):
128 bitbake('core-image-minimal') 129 bitbake('core-image-minimal')