On 9/24/19 4:15 AM, Robert Yang wrote:
It checked whether busybox is in pn-buildlist and task-depends.dot after run
"bitbake -g core-image-minimal", but busybox is not a must for
core-image-minimal,

You should explain why busybox is not a must since
usually busybox is the key package in c-i-m.

We have some images that deliberately exclude busybox and
I think this was found by using:
echo "BB_NO_NETWORK = \"0\"" >> conf/local.conf
echo "PNWHITELIST_LAYERS_remove = \"selftest\"" >> conf/local.conf
echo "SANITY_TESTED_DISTROS = \"\"" >> conf/local.conf
echo "DISTRO = \"wrlinux-graphics\"" >> conf/local.conf
echo "VIRTUAL-RUNTIME_no-busybox_forcevariable = \"\"" >> conf/local.conf
echo "PNWHITELIST_meta-layer0 += 'layerappendtest'" >> conf/local.conf

so mention that in general and VIRTUAL-RUNTIME_no-busybox_forcevariable
specifically.

so the case may fail when busybox is not present, this case
is used for checking "bitbake -g", so check core-image-minimal itself is more
reliable.

It's true that busybox may not be present but we want to
test that some package is in the image, not just that the
task-depends.dot file exists and mentions c-i-m.
How about searching for 'base-files' ?

../Randy


Signed-off-by: Robert Yang <liezhi.y...@windriver.com>
---
  meta/lib/oeqa/selftest/cases/bbtests.py | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index 8e59baf..4103396 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -118,11 +118,12 @@ class BitbakeTests(OESelftestTestCase):
              self.assertIn(task, result.output, msg="Couldn't find %s task.")
def test_bitbake_g(self):
-        result = bitbake('-g core-image-minimal')
+        recipe = 'core-image-minimal'
+        result = bitbake('-g %s' % recipe)
          for f in ['pn-buildlist', 'task-depends.dot']:
              self.addCleanup(os.remove, f)
          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)
-        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.")
+        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)
def test_image_manifest(self):
          bitbake('core-image-minimal')



--
# Randy MacLeod
# Wind River Linux
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to