1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

selftest/incompatible_lic: Remove references to AVAILABLE_LICENSES

The AVAILABLE_LICENSES variable has been removed from OE-Core.

(From OE-Core rev: bf4a7eee09245c0f7f8939f4cd522646fec6e507)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Kjellerstedt
2022-03-23 17:14:57 +01:00
committed by Richard Purdie
parent e3c002527a
commit d01b1919dc
@@ -13,15 +13,15 @@ class IncompatibleLicenseTestObsolete(OESelftestTestCase):
if error_msg not in result.output: if error_msg not in result.output:
raise AssertionError(result.output) raise AssertionError(result.output)
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES) # Verify that a package with an SPDX license cannot be built when
# cannot be built when INCOMPATIBLE_LICENSE contains an alias (in # INCOMPATIBLE_LICENSE contains an alias (in SPDXLICENSEMAP) of this SPDX
# SPDXLICENSEMAP) of this SPDX license # license
def test_incompatible_alias_spdx_license(self): def test_incompatible_alias_spdx_license(self):
self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPLv3', "is an obsolete license, please use an SPDX reference in INCOMPATIBLE_LICENSE") self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPLv3', "is an obsolete license, please use an SPDX reference in INCOMPATIBLE_LICENSE")
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES) # Verify that a package with an SPDX license cannot be built when
# cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded alias # INCOMPATIBLE_LICENSE contains a wildcarded alias license matching this
# license matching this SPDX license # SPDX license
def test_incompatible_alias_spdx_license_wildcard(self): def test_incompatible_alias_spdx_license_wildcard(self):
self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPLv3', "*GPLv3 is an invalid license wildcard entry") self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPLv3', "*GPLv3 is an invalid license wildcard entry")
@@ -43,16 +43,14 @@ class IncompatibleLicenseTestObsolete(OESelftestTestCase):
self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPLv3', "*GPLv3 is an invalid license wildcard entry") self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPLv3', "*GPLv3 is an invalid license wildcard entry")
# Verify that a package with multiple SPDX licenses (from # Verify that a package with multiple SPDX licenses cannot be built when
# AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a # INCOMPATIBLE_LICENSE contains a wildcard to some of them
# wildcard to some of them
def test_incompatible_spdx_licenses_wildcard(self): def test_incompatible_spdx_licenses_wildcard(self):
self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', '*GPL-3.0-only', "*GPL-3.0-only is an invalid license wildcard entry") self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', '*GPL-3.0-only', "*GPL-3.0-only is an invalid license wildcard entry")
# Verify that a package with multiple SPDX licenses (from # Verify that a package with multiple SPDX licenses cannot be built when
# AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a # INCOMPATIBLE_LICENSE contains a wildcard matching all licenses
# wildcard matching all licenses
def test_incompatible_all_licenses_wildcard(self): def test_incompatible_all_licenses_wildcard(self):
self.lic_test('incompatible-licenses', 'GPL-2.0-only GPL-3.0-only LGPL-3.0-only', '*', "* is an invalid license wildcard entry") self.lic_test('incompatible-licenses', 'GPL-2.0-only GPL-3.0-only LGPL-3.0-only', '*', "* is an invalid license wildcard entry")
@@ -67,14 +65,14 @@ class IncompatibleLicenseTests(OESelftestTestCase):
if error_msg not in result.output: if error_msg not in result.output:
raise AssertionError(result.output) raise AssertionError(result.output)
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES) # Verify that a package with an SPDX license cannot be built when
# cannot be built when INCOMPATIBLE_LICENSE contains this SPDX license # INCOMPATIBLE_LICENSE contains this SPDX license
def test_incompatible_spdx_license(self): def test_incompatible_spdx_license(self):
self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPL-3.0-only') self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPL-3.0-only')
# Verify that a package with an SPDX license (from AVAILABLE_LICENSES) # Verify that a package with an SPDX license cannot be built when
# cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded license # INCOMPATIBLE_LICENSE contains a wildcarded license matching this SPDX
# matching this SPDX license # license
def test_incompatible_spdx_license_wildcard(self): def test_incompatible_spdx_license_wildcard(self):
self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPL-3.0*') self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPL-3.0*')
@@ -84,14 +82,12 @@ class IncompatibleLicenseTests(OESelftestTestCase):
def test_incompatible_spdx_license_alias(self): def test_incompatible_spdx_license_alias(self):
self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 'GPL-3.0-only') self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 'GPL-3.0-only')
# Verify that a package with multiple SPDX licenses (from # Verify that a package with multiple SPDX licenses cannot be built when
# AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains # INCOMPATIBLE_LICENSE contains some of them
# some of them
def test_incompatible_spdx_licenses(self): def test_incompatible_spdx_licenses(self):
self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', 'GPL-3.0-only LGPL-3.0-only') 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 a non-SPDX license (neither in # Verify that a package with a non-SPDX license cannot be built when
# AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when
# INCOMPATIBLE_LICENSE contains this license # INCOMPATIBLE_LICENSE contains this license
def test_incompatible_nonspdx_license(self): def test_incompatible_nonspdx_license(self):
self.lic_test('incompatible-nonspdx-license', 'FooLicense', 'FooLicense') self.lic_test('incompatible-nonspdx-license', 'FooLicense', 'FooLicense')