Skip to contentSkip to conversation

selftest/virgl: use pkg-config from the host

PATCH In review Alexander Kanavin 2 participants 3 messages Jan 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftest/virgl: use pkg-config from the host

The check needs to report dri location on the host machine, so pkg-config binary needs to be capable of finding the needed dri.pc file on the host, and therefore needs to know where host .pc files are located.

This may not be the case when using pkg-config from buildtools, so this forces usage of host pkg-config.

runqemu already does the same PATH tweak, so this simply brings the two in sync.

---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +1 -1
index ae79724956..7d99c158e5 100644
@@ -268,7 +268,7 @@ class TestImage(OESelftestTestCase):
         except FileNotFoundError:
             self.fail("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint))
         try:
-            dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
+            dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True)
         except subprocess.CalledProcessError as e:
             self.fail("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
         qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
Signature · 1 line
2.30.2
#1 lore raw
Quoted 6 lines · Alexander Kanavin

The check needs to report dri location on the host machine, so pkg-config binary needs to be capable of finding the needed dri.pc file on the host, and therefore needs to know where host .pc files are located.

Quoted 6 lines

This may not be the case when using pkg-config from buildtools, so this forces usage of host pkg-config.

runqemu already does the same PATH tweak, so this simply brings the two in sync.

I have seen minimal distros with yocto prerequisites installs but no pkgconfig installed. So it will be good to add pkgconfig to pre-requisites explicitly as well.

Quoted 30 lines
---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +1 -2
index ae79724956..7d99c158e5 100644
@@ -268,7 +268,7 @@ class TestImage(OESelftestTestCase):
         except FileNotFoundError:
             self.fail("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint))
         try:
-            dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
+            dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True)
         except subprocess.CalledProcessError as e:
             self.fail("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
         qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
--

2.30.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175802): https://lists.openembedded.org/g/openembedded-core/message/175802
Mute This Topic: https://lists.openembedded.org/mt/96224911/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 3 lines · Khem Raj

I have seen minimal distros with yocto prerequisites installs but no pkgconfig installed. So it will be good to add pkgconfig to pre-requisites explicitly as well.

This is only needed if you want virgl acceleration. And even then, runqemu will prompt you to install the needed pieces if it can't find them.

Alex