]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/selftest/meson: use iputils instead of libepoxy
authorRoss Burton <ross.burton@arm.com>
Thu, 11 Dec 2025 17:55:46 +0000 (17:55 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Dec 2025 18:00:31 +0000 (18:00 +0000)
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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/sdk/cases/meson.py

index 74199889223bbcbcf5f434dd237057fb466d9259..77864b2f8d360741616fc3a3d5e27b0449666d16 100644 (file)
@@ -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"))