From: Ross Burton Date: Thu, 11 Dec 2025 17:55:46 +0000 (+0000) Subject: oeqa/selftest/meson: use iputils instead of libepoxy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ce6f9fcf86920cdafe311973f12d162adcd5742;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git oeqa/selftest/meson: use iputils instead of libepoxy 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 Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py index 7419988922..77864b2f8d 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"))