]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa sdk cases: Skip SDK test cases when TCLIBC is newlib
authorMark Hatle <mark.hatle@amd.com>
Thu, 25 Jul 2024 16:30:46 +0000 (11:30 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Jul 2024 10:54:29 +0000 (11:54 +0100)
Newlib generally requires additional components to function.  Skip the
cases where newlib is known to not work.

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/sdk/cases/autotools.py
meta/lib/oeqa/sdk/cases/cmake.py
meta/lib/oeqa/sdk/cases/gcc.py
meta/lib/oeqa/sdk/cases/gtk3.py
meta/lib/oeqa/sdk/cases/makefile.py
meta/lib/oeqa/sdk/cases/meson.py

index 848e9392ec004632dcd717205cc68b7b895deaff..4bac28f04df4d27b3198ba54e2776647224f40d7 100644 (file)
@@ -7,6 +7,7 @@
 import os
 import tempfile
 import subprocess
+import unittest
 
 from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
@@ -16,6 +17,11 @@ class AutotoolsTest(OESDKTestCase):
     """
     Check that autotools will cross-compile correctly.
     """
+    def setUp(self):
+        libc = self.td.get("TCLIBC")
+        if libc in [ 'newlib' ]:
+            raise unittest.SkipTest("AutotoolsTest class: SDK doesn't contain a supported C library")
+
     def test_cpio(self):
         with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir:
             tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz")
index db7d826a38a69356e628e0e13269054d29d171d5..cb0944ee995740d86b97e12378c84e8afebe8677 100644 (file)
@@ -19,6 +19,10 @@ class CMakeTest(OESDKTestCase):
     """
 
     def setUp(self):
+        libc = self.td.get("TCLIBC")
+        if libc in [ 'newlib' ]:
+            raise unittest.SkipTest("CMakeTest class: SDK doesn't contain a supported C library")
+
         if not (self.tc.hasHostPackage("nativesdk-cmake") or
                 self.tc.hasHostPackage("cmake-native")):
             raise unittest.SkipTest("CMakeTest: needs cmake")
index fc28b9c3d43f201778d7f48c924d2a2fa4de48d6..e810d2c42be5cf9195272dc917e4a065b6881d7a 100644 (file)
@@ -26,6 +26,10 @@ class GccCompileTest(OESDKTestCase):
                     os.path.join(self.tc.sdk_dir, f))
 
     def setUp(self):
+        libc = self.td.get("TCLIBC")
+        if libc in [ 'newlib' ]:
+            raise unittest.SkipTest("GccCompileTest class: SDK doesn't contain a supported C library")
+
         machine = self.td.get("MACHINE")
         if not (self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine) or
                 self.tc.hasHostPackage("^gcc-", regex=True)):
index c329c4bb86c1b1f6b6c56838201442655878d22a..8f60d5e7da7c736b498375f109051c860c18baed 100644 (file)
@@ -18,6 +18,10 @@ class GTK3Test(OESDKTestCase):
     Test that autotools and GTK+ 3 compiles correctly.
     """
     def setUp(self):
+        libc = self.td.get("TCLIBC")
+        if libc in [ 'newlib' ]:
+            raise unittest.SkipTest("GTK3Test class: SDK doesn't contain a supported C library")
+
         if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or \
                 self.tc.hasTargetPackage("libgtk-3.0", multilib=True)):
             raise unittest.SkipTest("GalculatorTest class: SDK don't support gtk+3")
index 2ff54ce25fff7659f84af04d217f89b9395e0cc0..e1e2484820659c23952cf559c3b047508f78a437 100644 (file)
@@ -5,6 +5,7 @@
 #
 
 import os, tempfile, subprocess
+import unittest
 from oeqa.sdk.case import OESDKTestCase
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
@@ -13,6 +14,11 @@ class MakefileTest(OESDKTestCase):
     """
     Test that "plain" compilation works, using just $CC $CFLAGS etc.
     """
+    def setUp(self):
+        libc = self.td.get("TCLIBC")
+        if libc in [ 'newlib' ]:
+            raise unittest.SkipTest("MakefileTest class: SDK doesn't contain a supported C library")
+
     def test_lzip(self):
         with tempfile.TemporaryDirectory(prefix="lzip", dir=self.tc.sdk_dir) as testdir:
             tarball = self.fetch(testdir, self.td["DL_DIR"], "http://downloads.yoctoproject.org/mirror/sources/lzip-1.19.tar.gz")
index be53df204a5c933bc2fdf349b0344b5b118bcbaa..1edf78720ac73ec0aece8cbf641b561b3988a79c 100644 (file)
@@ -18,6 +18,10 @@ class MesonTest(OESDKTestCase):
     Test that Meson builds correctly.
     """
     def setUp(self):
+        libc = self.td.get("TCLIBC")
+        if libc in [ 'newlib' ]:
+            raise unittest.SkipTest("MesonTest class: SDK doesn't contain a supported C library")
+
         if not (self.tc.hasHostPackage("nativesdk-meson") or
                 self.tc.hasHostPackage("meson-native")):
             raise unittest.SkipTest("MesonTest: needs meson")