libepoxy is suboptimal for the SDK testing purposes, mainly because it
is a GL-based library so we have to disable all of the functionality.
While this hasn't been a problem, meson 1.9.2 introduces a change of
behaviour which breaks the build.

Take this opportunity to switch to iputils, which is actively maintained,
has minimal dependencies, and builds faster.

Also move some asserts into build_meson() to avoid duplication in the
test case.

Signed-off-by: Ross Burton <[email protected]>
---
 meta/lib/oeqa/sdk/cases/meson.py | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py
index 74199889223..77864b2f8d3 100644
--- a/meta/lib/oeqa/sdk/cases/meson.py
+++ b/meta/lib/oeqa/sdk/cases/meson.py
@@ -34,6 +34,9 @@ class MesonTestBase(OESDKTestCase):
         """
         log = self._run(f"meson setup --warnlevel 1 {builddir} {sourcedir} 
{options}")
 
+        # Check that the build directory now exists
+        self.assertTrue(os.path.isdir(builddir))
+
         # Check that Meson thinks we're doing a cross build and not a native
         self.assertIn("Build type: cross build", log)
 
@@ -49,24 +52,24 @@ class MesonTestBase(OESDKTestCase):
 
         if installdir:
             self._run(f"meson install -C {builddir} --destdir {installdir}")
+            # Check that the install directory now exists
+            self.assertTrue(os.path.isdir(installdir))
 
 class MesonTest(MesonTestBase):
     """
     Test that Meson builds correctly.
     """
 
-    def test_epoxy(self):
-        with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) 
as testdir:
-            tarball = self.fetch(testdir, self.td["DL_DIR"], 
"https://github.com/anholt/libepoxy/releases/download/1.5.3/libepoxy-1.5.3.tar.xz";)
+    def test_iputils(self):
+        with tempfile.TemporaryDirectory(prefix="iputils", 
dir=self.tc.sdk_dir) as testdir:
+            tarball = self.fetch(testdir, self.td["DL_DIR"], 
"https://github.com/iputils/iputils/releases/download/20250605/iputils-20250605.tar.gz";)
 
-            sourcedir = os.path.join(testdir, "libepoxy-1.5.3")
+            sourcedir = os.path.join(testdir, "iputils-20250605")
             builddir = os.path.join(testdir, "build")
             installdir = os.path.join(testdir, "install")
 
             subprocess.check_output(["tar", "xf", tarball, "-C", testdir], 
stderr=subprocess.STDOUT)
             self.assertTrue(os.path.isdir(sourcedir))
 
-            os.makedirs(builddir)
-            self.build_meson(sourcedir, builddir, installdir, "-Degl=no 
-Dglx=no -Dx11=false")
-            self.assertTrue(os.path.isdir(installdir))
-            self.check_elf(os.path.join(installdir, "usr", "local", "lib", 
"libepoxy.so"))
+            self.build_meson(sourcedir, builddir, installdir, "-DUSE_CAP=false 
-DUSE_IDN=false")
+            self.check_elf(os.path.join(installdir, "usr", "local", "bin", 
"ping"))
-- 
2.43.0

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

Reply via email to