From: Fawzi KHABER <fawzi.kha...@smile.fr>

Fix [Yocto #15085]

Signed-off-by: Fawzi KHABER <fawzi.kha...@smile.fr>
Signed-off-by: Yoann Congal <yoann.con...@smile.fr>
---
 meta/lib/oeqa/selftest/cases/devtool.py | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 4c8e375d00..c5ed8f5720 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -366,6 +366,29 @@ class DevtoolAddTests(DevtoolBase):
             bindir = bindir[1:]
         self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 
'pv')), 'pv binary not found in D')
 
+    def test_devtool_add_binary(self):
+        # Test "devtool add -b" with an arbitrary binary package from Yocto 
mirrors
+        pn = 'pvr-bin-cdv-devel'
+        pv = '1.0.3-1.1'
+        url = 
'http://downloads.yoctoproject.org/mirror/sources/pvr-bin-cdv-devel-1.0.3-1.1.i586.rpm'
+
+        self.track_for_cleanup(self.workspacedir)
+        self.add_command_to_tearDown('bitbake -c cleansstate %s' % pn)
+        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+
+        # Test devtool add -b
+        result = runCmd('devtool add  -b %s %s' % (pn, url))
+        self.assertExists(os.path.join(self.workspacedir, 'conf', 
'layer.conf'), 'Workspace directory not created')
+
+        # Test devtool build
+        result = runCmd('devtool build %s' % pn)
+        bb_vars = get_bb_vars(['D', 'bindir'], pn)
+        installdir = bb_vars['D']
+        self.assertTrue(installdir, 'Could not query installdir variable')
+
+        # Check that a known file from the binary package has indeed been 
installed
+        self.assertTrue(os.path.isfile(os.path.join(installdir, 'usr', 
'include', 'EGL', 'egl.h')), 'egl.h not found in D')
+
     def test_devtool_add_git_local(self):
         # We need dbus built so that DEPENDS recognition works
         bitbake('dbus')
-- 
2.30.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183543): 
https://lists.openembedded.org/g/openembedded-core/message/183543
Mute This Topic: https://lists.openembedded.org/mt/99825616/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to