mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
incompatible_lic.py: Add tests for incompatible licenses with wildcards
Suggested-by: Quentin Schulz <quentin.schulz@streamunlimited.com> (From OE-Core rev: ef7c44c9bdf30a02ccc71f26c27aab45d6adf1fb) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
29b3cc9655
commit
86f318e524
|
@ -0,0 +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"
|
|
@ -23,6 +23,18 @@ class IncompatibleLicenseTests(OESelftestTestCase):
|
|||
def test_incompatible_alias_spdx_license(self):
|
||||
self.lic_test('incompatible-license', 'GPL-3.0', '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')
|
||||
|
||||
# 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')
|
||||
|
||||
# Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
|
||||
# license cannot be built when INCOMPATIBLE_LICENSE contains this SPDX
|
||||
# license
|
||||
|
@ -34,6 +46,36 @@ class IncompatibleLicenseTests(OESelftestTestCase):
|
|||
def test_incompatible_alias_spdx_license_alias(self):
|
||||
self.lic_test('incompatible-license-alias', 'GPL-3.0', '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')
|
||||
|
||||
# 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')
|
||||
|
||||
# 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')
|
||||
|
||||
# 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')
|
||||
|
||||
# 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', '*')
|
||||
|
||||
# Verify that a package with a non-SPDX license (neither in
|
||||
# AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when
|
||||
# INCOMPATIBLE_LICENSE contains this license
|
||||
|
|
Loading…
Reference in New Issue
Block a user