From 788ea3f7a18afabb310bae1d7bbee4f88e89a95c Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Sat, 10 May 2025 09:43:39 +0100 Subject: [PATCH] oeqa/sdk: add simple test that the manifests are not empty 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. (From OE-Core rev: 43288b19e93f0c07b347d6e5d6f7f10e96219f96) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/sdk/cases/manifest.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta/lib/oeqa/sdk/cases/manifest.py diff --git a/meta/lib/oeqa/sdk/cases/manifest.py b/meta/lib/oeqa/sdk/cases/manifest.py new file mode 100644 index 0000000000..ee59a5f338 --- /dev/null +++ b/meta/lib/oeqa/sdk/cases/manifest.py @@ -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, {})