With the separate of the "-only" and "-or-later" licenses, we need to
update the tests to match the messages now given in the output.

Also use a mix of canonicalised and non-canonlised names in the
reference recipes to help test those cases and ensure coverage.

Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
---
 .../license/incompatible-license.bb           |  2 +-
 .../license/incompatible-licenses.bb          |  2 +-
 .../oeqa/selftest/cases/incompatible_lic.py   | 26 +++++++++----------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/meta-selftest/recipes-test/license/incompatible-license.bb 
b/meta-selftest/recipes-test/license/incompatible-license.bb
index 1728ad76b71..282f5c28751 100644
--- a/meta-selftest/recipes-test/license/incompatible-license.bb
+++ b/meta-selftest/recipes-test/license/incompatible-license.bb
@@ -1,3 +1,3 @@
 SUMMARY = "Recipe with an SPDX license"
 DESCRIPTION = "Is licensed with an SPDX license to be used for testing"
-LICENSE = "GPL-3.0"
+LICENSE = "GPL-3.0-only"
diff --git a/meta-selftest/recipes-test/license/incompatible-licenses.bb 
b/meta-selftest/recipes-test/license/incompatible-licenses.bb
index 9c1545efba2..ab3b58d2c97 100644
--- a/meta-selftest/recipes-test/license/incompatible-licenses.bb
+++ b/meta-selftest/recipes-test/license/incompatible-licenses.bb
@@ -1,3 +1,3 @@
 SUMMARY = "Recipe with multiple SPDX licenses"
 DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing"
-LICENSE = "GPL-2.0 & GPL-3.0 & LGPL-3.0"
+LICENSE = "GPL-2.0-only & GPL-3.0 & LGPL-3.0-only"
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py 
b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
index 2a6382a1a85..152da6332ab 100644
--- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py
+++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
@@ -15,66 +15,66 @@ class IncompatibleLicenseTests(OESelftestTestCase):
     # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
     # cannot be built when INCOMPATIBLE_LICENSE contains this SPDX license
     def test_incompatible_spdx_license(self):
-        self.lic_test('incompatible-license', 'GPL-3.0', 'GPL-3.0')
+        self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPL-3.0-only')
 
     # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
     # cannot be built when INCOMPATIBLE_LICENSE contains an alias (in
     # SPDXLICENSEMAP) of this SPDX license
     def test_incompatible_alias_spdx_license(self):
-        self.lic_test('incompatible-license', 'GPL-3.0', 'GPLv3')
+        self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPLv3')
 
     # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
     # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded license
     # matching this SPDX license
     def test_incompatible_spdx_license_wildcard(self):
-        self.lic_test('incompatible-license', 'GPL-3.0', '*GPL-3.0')
+        self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPL-3.0-only')
 
     # Verify that a package with an SPDX license (from AVAILABLE_LICENSES)
     # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded alias
     # license matching this SPDX license
     def test_incompatible_alias_spdx_license_wildcard(self):
-        self.lic_test('incompatible-license', 'GPL-3.0', '*GPLv3')
+        self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPLv3')
 
     # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
     # license cannot be built when INCOMPATIBLE_LICENSE contains this SPDX
     # license
     def test_incompatible_spdx_license_alias(self):
-        self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPL-3.0')
+        self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 
'GPL-3.0-only')
 
     # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
     # license cannot be built when INCOMPATIBLE_LICENSE contains this alias
     def test_incompatible_alias_spdx_license_alias(self):
-        self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPLv3')
+        self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 'GPLv3')
 
     # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
     # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded
     # license matching this SPDX license
     def test_incompatible_spdx_license_alias_wildcard(self):
-        self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPL-3.0')
+        self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPL-3.0')
 
     # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
     # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded
     # alias license matching the SPDX license
     def test_incompatible_alias_spdx_license_alias_wildcard(self):
-        self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPLv3')
+        self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPLv3')
 
     # Verify that a package with multiple SPDX licenses (from
     # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains
     # some of them
     def test_incompatible_spdx_licenses(self):
-        self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', 'GPL-3.0 
LGPL-3.0')
+        self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', 
'GPL-3.0-only LGPL-3.0-only')
 
     # Verify that a package with multiple SPDX licenses (from
     # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a
     # wildcard to some of them
     def test_incompatible_spdx_licenses_wildcard(self):
-        self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', '*GPL-3.0')
+        self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', 
'*GPL-3.0-only')
 
     # Verify that a package with multiple SPDX licenses (from
     # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a
     # wildcard matching all licenses
     def test_incompatible_all_licenses_wildcard(self):
-        self.lic_test('incompatible-licenses', 'GPL-2.0 GPL-3.0 LGPL-3.0', '*')
+        self.lic_test('incompatible-licenses', 'GPL-2.0-only GPL-3.0-only 
LGPL-3.0-only', '*')
 
     # Verify that a package with a non-SPDX license (neither in
     # AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when
@@ -91,7 +91,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 
LGPL-3.0"
 
     def test_bash_default(self):
         self.write_config(self.default_config())
-        error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash 
cannot be installed into the image because it has incompatible license(s): 
GPL-3.0+"
+        error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash 
cannot be installed into the image because it has incompatible license(s): 
GPL-3.0-or-later"
 
         result = bitbake('core-image-minimal', ignore_status=True)
         if error_msg not in result.output:
@@ -99,7 +99,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 
LGPL-3.0"
 
     def test_bash_and_license(self):
         self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = 
" & SomeLicense"')
-        error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash 
cannot be installed into the image because it has incompatible license(s): 
GPL-3.0+"
+        error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash 
cannot be installed into the image because it has incompatible license(s): 
GPL-3.0-or-later"
 
         result = bitbake('core-image-minimal', ignore_status=True)
         if error_msg not in result.output:
-- 
2.27.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148316): 
https://lists.openembedded.org/g/openembedded-core/message/148316
Mute This Topic: https://lists.openembedded.org/mt/80734230/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to