diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/oelib/license.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/license.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oelib/license.py b/meta/lib/oeqa/selftest/cases/oelib/license.py index 6ebbee589f..5eea12e761 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/license.py +++ b/meta/lib/oeqa/selftest/cases/oelib/license.py | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
2 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
3 | # | 5 | # |
4 | 6 | ||
@@ -15,11 +17,11 @@ class SeenVisitor(oe.license.LicenseVisitor): | |||
15 | 17 | ||
16 | class TestSingleLicense(TestCase): | 18 | class TestSingleLicense(TestCase): |
17 | licenses = [ | 19 | licenses = [ |
18 | "GPLv2", | 20 | "GPL-2.0-only", |
19 | "LGPL-2.0", | 21 | "LGPL-2.0-only", |
20 | "Artistic", | 22 | "Artistic-1.0", |
21 | "MIT", | 23 | "MIT", |
22 | "GPLv3+", | 24 | "GPL-3.0-or-later", |
23 | "FOO_BAR", | 25 | "FOO_BAR", |
24 | ] | 26 | ] |
25 | invalid_licenses = ["GPL/BSD"] | 27 | invalid_licenses = ["GPL/BSD"] |
@@ -67,9 +69,9 @@ class TestComplexCombinations(TestSimpleCombinations): | |||
67 | "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"], | 69 | "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"], |
68 | "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"], | 70 | "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"], |
69 | "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"], | 71 | "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"], |
70 | "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"], | 72 | "(GPL-2.0-only|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0-only", "BSD-4-clause", "MIT"], |
71 | } | 73 | } |
72 | preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"] | 74 | preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0-only"] |
73 | 75 | ||
74 | class TestIsIncluded(TestCase): | 76 | class TestIsIncluded(TestCase): |
75 | tests = { | 77 | tests = { |
@@ -87,12 +89,12 @@ class TestIsIncluded(TestCase): | |||
87 | [True, ["BAR", "FOOBAR"]], | 89 | [True, ["BAR", "FOOBAR"]], |
88 | ("(FOO | BAR) & FOOBAR | BAZ & MOO & BARFOO", None, "FOO"): | 90 | ("(FOO | BAR) & FOOBAR | BAZ & MOO & BARFOO", None, "FOO"): |
89 | [True, ["BAZ", "MOO", "BARFOO"]], | 91 | [True, ["BAZ", "MOO", "BARFOO"]], |
90 | ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, None): | 92 | ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, None): |
91 | [True, ["GPL-3.0", "GPL-2.0", "LGPL-2.1"]], | 93 | [True, ["GPL-3.0-or-later", "GPL-2.0-only", "LGPL-2.1-only"]], |
92 | ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0"): | 94 | ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, "GPL-3.0-or-later"): |
93 | [True, ["Proprietary"]], | 95 | [True, ["Proprietary"]], |
94 | ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0 Proprietary"): | 96 | ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, "GPL-3.0-or-later Proprietary"): |
95 | [False, ["GPL-3.0"]] | 97 | [False, ["GPL-3.0-or-later"]] |
96 | } | 98 | } |
97 | 99 | ||
98 | def test_tests(self): | 100 | def test_tests(self): |