diff mbox series

[7/8] oeqa/selftest/meson: use iputils instead of libepoxy

Message ID 20251210183308.4022909-7-ross.burton@arm.com
State New
Headers show
Series [1/8] iputils: just set bindir, not prefix | expand

Commit Message

Ross Burton Dec. 10, 2025, 6:33 p.m. UTC
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 <ross.burton@arm.com>
---
 meta/lib/oeqa/sdk/cases/meson.py | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py
index 74199889223..a066bc134b6 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)
+            self.check_elf(os.path.join(installdir, "usr", "local", "bin", "ping"))