Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself
@ 2019-09-24  8:15 Robert Yang
  2019-09-24  8:15 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2019-09-24  8:15 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 95ad5626296380358c8a502a3e04879dab653d78:

  build-appliance-image: Update to master head revision (2019-09-19 20:32:47 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/test
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/test

Robert Yang (1):
  cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself

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

-- 
2.7.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself
  2019-09-24  8:15 [PATCH 0/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself Robert Yang
@ 2019-09-24  8:15 ` Robert Yang
  2019-09-24 20:46   ` Randy MacLeod
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2019-09-24  8:15 UTC (permalink / raw)
  To: openembedded-core

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, 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.

Signed-off-by: Robert Yang <liezhi.yang@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')
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself
  2019-09-24  8:15 ` [PATCH 1/1] " Robert Yang
@ 2019-09-24 20:46   ` Randy MacLeod
  2019-09-25  1:41     ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Randy MacLeod @ 2019-09-24 20:46 UTC (permalink / raw)
  To: Robert Yang, openembedded-core

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.yang@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself
  2019-09-24 20:46   ` Randy MacLeod
@ 2019-09-25  1:41     ` Robert Yang
  2019-09-25  2:28       ` Randy MacLeod
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2019-09-25  1:41 UTC (permalink / raw)
  To: Randy MacLeod, openembedded-core

Hi Randy,

On 9/25/19 4:46 AM, Randy MacLeod wrote:
> 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.

Thanks for the explanation, I think that the maintainers know busybox
is not a must in oe-core, not matter for core-image-minimal or sato,
so I didn't add very detailed explanations.

> 
>> 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' ?

The base-files is my first thought, but it's not a must either, for testing
"bitbake -g recipe", I think that check the recipe itself is more reliable than
others.

// Robert

> 
> ../Randy
> 
>>
>> Signed-off-by: Robert Yang <liezhi.yang@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')
>>
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself
  2019-09-25  1:41     ` Robert Yang
@ 2019-09-25  2:28       ` Randy MacLeod
  2019-09-25  2:54         ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Randy MacLeod @ 2019-09-25  2:28 UTC (permalink / raw)
  To: Robert Yang, openembedded-core

On 9/24/19 9:41 PM, Robert Yang wrote:
> Hi Randy,
> 
> On 9/25/19 4:46 AM, Randy MacLeod wrote:
>> 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.
> 
> Thanks for the explanation, I think that the maintainers know busybox
> is not a must in oe-core, not matter for core-image-minimal or sato,
> so I didn't add very detailed explanations.

commit logs are for maintainers, developers and users all
of varying ranges of familiarity with oe-core so
it's better to over-explain, without going over the top, IMO.

> 
>>
>>> 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' ?
> 
> The base-files is my first thought, but it's not a must either, for testing
> "bitbake -g recipe", I think that check the recipe itself is more 
> reliable than
> others.

If you had explained that in the commit log,
I wouldn't have replied, eh? ;-)

Sure base-files might not be part of the image but I
haven't seen an image that has done that. Your check will
always work so it really depends on the intent of the original
check.

../Randy

> 
> // Robert
> 
>>
>> ../Randy
>>
>>>
>>> Signed-off-by: Robert Yang <liezhi.yang@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself
  2019-09-25  2:28       ` Randy MacLeod
@ 2019-09-25  2:54         ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2019-09-25  2:54 UTC (permalink / raw)
  To: Randy MacLeod, openembedded-core



On 9/25/19 10:28 AM, Randy MacLeod wrote:
> On 9/24/19 9:41 PM, Robert Yang wrote:
>> Hi Randy,
>>
>> On 9/25/19 4:46 AM, Randy MacLeod wrote:
>>> 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.
>>
>> Thanks for the explanation, I think that the maintainers know busybox
>> is not a must in oe-core, not matter for core-image-minimal or sato,
>> so I didn't add very detailed explanations.
> 
> commit logs are for maintainers, developers and users all
> of varying ranges of familiarity with oe-core so
> it's better to over-explain, without going over the top, IMO.
> 
>>
>>>
>>>> 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' ?
>>
>> The base-files is my first thought, but it's not a must either, for testing
>> "bitbake -g recipe", I think that check the recipe itself is more reliable than
>> others.
> 
> If you had explained that in the commit log,
> I wouldn't have replied, eh? ;-)
> 
> Sure base-files might not be part of the image but I
> haven't seen an image that has done that. Your check will
> always work so it really depends on the intent of the original
> check.

Yes, make sense, I will send a V2 to check base-files.

// Robert

> 
> ../Randy
> 
>>
>> // Robert
>>
>>>
>>> ../Randy
>>>
>>>>
>>>> Signed-off-by: Robert Yang <liezhi.yang@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')
>>>>
>>>
>>>
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-25  2:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-24  8:15 [PATCH 0/1] cases/bbtests.py: test_bitbake_g(): Check core-image-minimal itself Robert Yang
2019-09-24  8:15 ` [PATCH 1/1] " Robert Yang
2019-09-24 20:46   ` Randy MacLeod
2019-09-25  1:41     ` Robert Yang
2019-09-25  2:28       ` Randy MacLeod
2019-09-25  2:54         ` Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox