]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/sdk: add simple test that the manifests are not empty
authorRoss Burton <ross.burton@arm.com>
Sat, 10 May 2025 08:43:39 +0000 (09:43 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 May 2025 09:52:52 +0000 (10:52 +0100)
Simple test to sanity check that the generated SDK manifest was parsed
correctly and isn't empty.

This test is complicated by the fact that minimal eSDKs without a
toolchain do in fact have an empty manifest, so also check for that.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/sdk/cases/manifest.py [new file with mode: 0644]

diff --git a/meta/lib/oeqa/sdk/cases/manifest.py b/meta/lib/oeqa/sdk/cases/manifest.py
new file mode 100644 (file)
index 0000000..ee59a5f
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.sdkext.context import OESDKExtTestContext
+
+
+class ManifestTest(OESDKTestCase):
+    def test_manifests(self):
+        """
+        Verify that the host and target manifests are not empty, unless this is
+        a minimal eSDK without toolchain in which case they should be empty.
+        """
+        if (
+            isinstance(self.tc, OESDKExtTestContext)
+            and self.td.get("SDK_EXT_TYPE") == "minimal"
+            and self.td.get("SDK_INCLUDE_TOOLCHAIN") == "0"
+        ):
+            self.assertEqual(self.tc.target_pkg_manifest, {})
+            self.assertEqual(self.tc.host_pkg_manifest, {})
+        else:
+            self.assertNotEqual(self.tc.target_pkg_manifest, {})
+            self.assertNotEqual(self.tc.host_pkg_manifest, {})