[elbe-devel] [PATCH v2 04/11] tests: example-mapping: provide mapping for zlib

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed Jul 24 12:22:00 CEST 2024


This is a direct match.
As the example-mapping can also be used as reference by users, make sure
its useful.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/tests/cyclonedx/example-mapping.xml    | 1 +
 elbepack/tests/test_parselicence.py             | 2 +-
 elbepack/tests/test_parselicence_reference.spdx | 4 ++--
 elbepack/tests/test_parselicence_reference.xml  | 8 +++-----
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/elbepack/tests/cyclonedx/example-mapping.xml b/elbepack/tests/cyclonedx/example-mapping.xml
index d7dbbde7fbc0..c9c410034cb3 100644
--- a/elbepack/tests/cyclonedx/example-mapping.xml
+++ b/elbepack/tests/cyclonedx/example-mapping.xml
@@ -38,6 +38,7 @@
                 <mapping name='CC-BY-SA-3.0'>CC-BY-SA-3.0</mapping>
 
                 <mapping name='ZLIB'>Zlib</mapping>
+                <mapping name='zlib'>Zlib</mapping>
                 <mapping name='MPL-2.0'>MPL-2.0</mapping>
                 <mapping name='Apache-2.0'>Apache-2.0</mapping>
                 <mapping name='GPL-3.0-with-GCC-exception'>GPL-3.0 WITH GCC-exception-3.1</mapping>
diff --git a/elbepack/tests/test_parselicence.py b/elbepack/tests/test_parselicence.py
index f4c2441b0094..4e67a9fe30ba 100644
--- a/elbepack/tests/test_parselicence.py
+++ b/elbepack/tests/test_parselicence.py
@@ -27,7 +27,7 @@ def test_parselicence(tmp_path):
         here.joinpath('cyclonedx', 'build-simple-example', 'licence-target.xml'),
     ], check=True, capture_output=True)
 
-    assert ps.stdout == b'statistics:\nnum:156 mr:137 hr:3 err_pkg:98\n'
+    assert ps.stdout == b'statistics:\nnum:156 mr:137 hr:3 err_pkg:97\n'
 
     xml_reference = here.joinpath('test_parselicence_reference.xml')
     assert xml_output.read_text() == xml_reference.read_text()
diff --git a/elbepack/tests/test_parselicence_reference.spdx b/elbepack/tests/test_parselicence_reference.spdx
index a5bdaf086bf7..07adcbc0b693 100644
--- a/elbepack/tests/test_parselicence_reference.spdx
+++ b/elbepack/tests/test_parselicence_reference.spdx
@@ -404,7 +404,7 @@ PackageLicenseInfoFromFiles: NOASSERTION
 PackageName: libdb5.3
 PackageDownloadLocation: NOASSERTION
 PackageLicenseConcluded: NOASSERTION
-PackageLicenseDeclared: UNKNOWN_MAPPING(Sleepycat) AND BSD-3-Clause AND BSD-3-Clause AND UNKNOWN_MAPPING(Ms-PL) AND (UNKNOWN_MAPPING(GPL) OR Artistic-1.0) AND UNKNOWN_MAPPING(X11) AND UNKNOWN_MAPPING(MIT-old) AND UNKNOWN_MAPPING(TCL-like) AND UNKNOWN_MAPPING(BSD-3-clause-fjord) AND GPL-3.0-only AND UNKNOWN_MAPPING(zlib) AND (Artistic-1.0 OR BSD-3-Clause) AND UNKNOWN_MAPPING(GPL)
+PackageLicenseDeclared: UNKNOWN_MAPPING(Sleepycat) AND BSD-3-Clause AND BSD-3-Clause AND UNKNOWN_MAPPING(Ms-PL) AND (UNKNOWN_MAPPING(GPL) OR Artistic-1.0) AND UNKNOWN_MAPPING(X11) AND UNKNOWN_MAPPING(MIT-old) AND UNKNOWN_MAPPING(TCL-like) AND UNKNOWN_MAPPING(BSD-3-clause-fjord) AND GPL-3.0-only AND Zlib AND (Artistic-1.0 OR BSD-3-Clause) AND UNKNOWN_MAPPING(GPL)
 PackageLicenseInfoFromFiles: NOASSERTION
 
 ## Package libdebconfclient0
@@ -880,7 +880,7 @@ PackageLicenseInfoFromFiles: NOASSERTION
 PackageName: libzstd1
 PackageDownloadLocation: NOASSERTION
 PackageLicenseConcluded: NOASSERTION
-PackageLicenseDeclared: (BSD-3-Clause OR GPL-2.0-only) AND UNKNOWN_MAPPING(zlib) AND MIT
+PackageLicenseDeclared: (BSD-3-Clause OR GPL-2.0-only) AND Zlib AND MIT
 PackageLicenseInfoFromFiles: NOASSERTION
 
 ## Package login
diff --git a/elbepack/tests/test_parselicence_reference.xml b/elbepack/tests/test_parselicence_reference.xml
index 3e8d94bcec88..ca2bbd872637 100644
--- a/elbepack/tests/test_parselicence_reference.xml
+++ b/elbepack/tests/test_parselicence_reference.xml
@@ -16905,7 +16905,7 @@ License: Sleepycat and BSD-3-clause
 <license>UNKNOWN_MAPPING(TCL-like)</license>
 <license>UNKNOWN_MAPPING(BSD-3-clause-fjord)</license>
 <license>GPL-3.0-only</license>
-<license>UNKNOWN_MAPPING(zlib)</license>
+<license>Zlib</license>
 <license>Artistic-1.0 OR BSD-3-Clause</license>
 <license>UNKNOWN_MAPPING(GPL)</license>
 </spdx_licenses><error>no mapping for "Sleepycat" for pkg "libdb5.3"</error>
@@ -16915,7 +16915,6 @@ License: Sleepycat and BSD-3-clause
 <error>no mapping for "MIT-old" for pkg "libdb5.3"</error>
 <error>no mapping for "TCL-like" for pkg "libdb5.3"</error>
 <error>no mapping for "BSD-3-clause-fjord" for pkg "libdb5.3"</error>
-<error>no mapping for "zlib" for pkg "libdb5.3"</error>
 <error>no mapping for "GPL" for pkg "libdb5.3"</error>
 </pkglicense>
 <pkglicense name="libdebconfclient0"><text>Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
@@ -46844,10 +46843,9 @@ License: BSD-3-clause
 </detailed>
 <spdx_licenses>
 <license>BSD-3-Clause OR GPL-2.0-only</license>
-<license>UNKNOWN_MAPPING(zlib)</license>
+<license>Zlib</license>
 <license>MIT</license>
-</spdx_licenses><error>no mapping for "zlib" for pkg "libzstd1"</error>
-</pkglicense>
+</spdx_licenses></pkglicense>
 <pkglicense name="login"><text>Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: Shadow
 Source: https://github.com/shadow-maint/shadow

-- 
2.45.2



More information about the elbe-devel mailing list