* [PATCH 0/1] pkgdata: fix test_find_path to consider multilib
@ 2019-06-17 8:32 Chen Qi
2019-06-17 8:32 ` [PATCH 1/1] " Chen Qi
0 siblings, 1 reply; 4+ messages in thread
From: Chen Qi @ 2019-06-17 8:32 UTC (permalink / raw)
To: openembedded-core
*** BLURB HERE ***
The following changes since commit 27d60c5a812774f0e5c43161e5b514c4aebdf301:
gstreamer1.0-libav: disable API documentation (2019-06-15 13:46:38 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/oeqa-pkgdata
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/oeqa-pkgdata
Chen Qi (1):
pkgdata: fix test_find_path to consider multilib
meta/lib/oeqa/selftest/cases/pkgdata.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] pkgdata: fix test_find_path to consider multilib
2019-06-17 8:32 [PATCH 0/1] pkgdata: fix test_find_path to consider multilib Chen Qi
@ 2019-06-17 8:32 ` Chen Qi
2019-06-17 15:51 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Chen Qi @ 2019-06-17 8:32 UTC (permalink / raw)
To: openembedded-core
Fix test_find_path test case to take into consideration of multilib
being enabled. After this change, no matter multilib is enabled or
not, the test case should pass.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/lib/oeqa/selftest/cases/pkgdata.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index 833a180..2bd15eb 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -47,10 +47,11 @@ class OePkgdataUtilTests(OESelftestTestCase):
self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)
def test_find_path(self):
- result = runCmd('oe-pkgdata-util find-path /lib/libz.so.1')
- self.assertEqual(result.output, 'zlib: /lib/libz.so.1')
+ base_libdir = get_bb_var('base_libdir')
+ result = runCmd('oe-pkgdata-util find-path %s/libz.so.1' % base_libdir)
+ self.assertEqual(result.output, 'zlib: %s/libz.so.1' % base_libdir)
result = runCmd('oe-pkgdata-util find-path /usr/bin/m4')
- self.assertEqual(result.output, 'm4: /usr/bin/m4')
+ self.assertTrue('m4: /usr/bin/m4' in result.output)
result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True)
self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
self.assertEqual(result.output, 'ERROR: Unable to find any package producing path /not/exist')
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] pkgdata: fix test_find_path to consider multilib
2019-06-17 8:32 ` [PATCH 1/1] " Chen Qi
@ 2019-06-17 15:51 ` Richard Purdie
2019-06-18 2:19 ` ChenQi
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2019-06-17 15:51 UTC (permalink / raw)
To: Chen Qi, openembedded-core
On Mon, 2019-06-17 at 16:32 +0800, Chen Qi wrote:
> Fix test_find_path test case to take into consideration of multilib
> being enabled. After this change, no matter multilib is enabled or
> not, the test case should pass.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> meta/lib/oeqa/selftest/cases/pkgdata.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
> index 833a180..2bd15eb 100644
> --- a/meta/lib/oeqa/selftest/cases/pkgdata.py
> +++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
> @@ -47,10 +47,11 @@ class OePkgdataUtilTests(OESelftestTestCase):
> self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)
>
> def test_find_path(self):
> - result = runCmd('oe-pkgdata-util find-path /lib/libz.so.1')
> - self.assertEqual(result.output, 'zlib: /lib/libz.so.1')
> + base_libdir = get_bb_var('base_libdir')
> + result = runCmd('oe-pkgdata-util find-path %s/libz.so.1' % base_libdir)
> + self.assertEqual(result.output, 'zlib: %s/libz.so.1' % base_libdir)
> result = runCmd('oe-pkgdata-util find-path /usr/bin/m4')
> - self.assertEqual(result.output, 'm4: /usr/bin/m4')
> + self.assertTrue('m4: /usr/bin/m4' in result.output)
> result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True)
> self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
> self.assertEqual(result.output, 'ERROR: Unable to find any package producing path /not/exist')
For selftest we really want a "known" configuration so I'm not sure we
want to go down this route as there are a lot of configurations which
could confuse the test results.
It would probably be better to have selftest only build a clean config
and accept a limited number of variables. The parallel execution code
did go a long way to getting us to the point where it would do that.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] pkgdata: fix test_find_path to consider multilib
2019-06-17 15:51 ` Richard Purdie
@ 2019-06-18 2:19 ` ChenQi
0 siblings, 0 replies; 4+ messages in thread
From: ChenQi @ 2019-06-18 2:19 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
On 06/17/2019 11:51 PM, Richard Purdie wrote:
> On Mon, 2019-06-17 at 16:32 +0800, Chen Qi wrote:
>> Fix test_find_path test case to take into consideration of multilib
>> being enabled. After this change, no matter multilib is enabled or
>> not, the test case should pass.
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>> meta/lib/oeqa/selftest/cases/pkgdata.py | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
>> index 833a180..2bd15eb 100644
>> --- a/meta/lib/oeqa/selftest/cases/pkgdata.py
>> +++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
>> @@ -47,10 +47,11 @@ class OePkgdataUtilTests(OESelftestTestCase):
>> self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)
>>
>> def test_find_path(self):
>> - result = runCmd('oe-pkgdata-util find-path /lib/libz.so.1')
>> - self.assertEqual(result.output, 'zlib: /lib/libz.so.1')
>> + base_libdir = get_bb_var('base_libdir')
>> + result = runCmd('oe-pkgdata-util find-path %s/libz.so.1' % base_libdir)
>> + self.assertEqual(result.output, 'zlib: %s/libz.so.1' % base_libdir)
>> result = runCmd('oe-pkgdata-util find-path /usr/bin/m4')
>> - self.assertEqual(result.output, 'm4: /usr/bin/m4')
>> + self.assertTrue('m4: /usr/bin/m4' in result.output)
>> result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True)
>> self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
>> self.assertEqual(result.output, 'ERROR: Unable to find any package producing path /not/exist')
> For selftest we really want a "known" configuration so I'm not sure we
> want to go down this route as there are a lot of configurations which
> could confuse the test results.
>
> It would probably be better to have selftest only build a clean config
> and accept a limited number of variables. The parallel execution code
> did go a long way to getting us to the point where it would do that.
>
> Cheers,
>
> Richard
>
>
>
Got it, Thanks.
Best Regards,
Chen Qi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-18 2:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 8:32 [PATCH 0/1] pkgdata: fix test_find_path to consider multilib Chen Qi
2019-06-17 8:32 ` [PATCH 1/1] " Chen Qi
2019-06-17 15:51 ` Richard Purdie
2019-06-18 2:19 ` ChenQi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox