selftests: add tests for INCOMPATIBLE_LICENSE
PATCH v5 1/1 selftests: add tests for INCOMPATIBLE_LICENSE
One bug went unnoticed without these selftests: an INCOMPATIBLE_LICENSE with a non-SPDX license for a package with that non-SPDX license wasn't enforcing the denial of build for said package. See 4b6ce4604cc15e289a48f8586d58a101b7a70b52 ("meta: license: fix non-SPDX license being removed from INCOMPATIBLE_LICENSE")
While adding a test for that particular case, let's add a few more so that we cover a handful more use cases of INCOMPATIBLE_LICENSE.
---
v5:
- removed useless OETestID import,
- renamed test_lic into lic_test so that the function isn't called by Python
unittest framework,
- added --dry-run to the bitbake command so that it does not do a full build to tell us the behaviour is not the one we expect (INCOMPATIBLE_LICENSE not working),
added in v4
.../license/incompatible-license-alias.bb | 3 ++ .../license/incompatible-license.bb | 3 ++ .../license/incompatible-nonspdx-license.bb | 3 ++ .../oeqa/selftest/cases/incompatible_lic.py | 41 +++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 meta-selftest/recipes-test/license/incompatible-license-alias.bb create mode 100644 meta-selftest/recipes-test/license/incompatible-license.bb create mode 100644 meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb create mode 100644 meta/lib/oeqa/selftest/cases/incompatible_lic.py
meta-selftest/recipes-test/license/incompatible-license-alias.bb new file +3 -0
@@ -0,0 +1,3 @@ +SUMMARY = "Recipe with an alias of an SPDX license" +DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing" +LICENSE = "GPLv3"
meta-selftest/recipes-test/license/incompatible-license.bb new file +3 -0
@@ -0,0 +1,3 @@ +SUMMARY = "Recipe with an SPDX license" +DESCRIPTION = "Is licensed with an SPDX license to be used for testing" +LICENSE = "GPL-3.0"
meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb new file +3 -0
@@ -0,0 +1,3 @@ +SUMMARY = "Recipe with a non-SPDX license" +DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing" +LICENSE = "FooLicense"
meta/lib/oeqa/selftest/cases/incompatible_lic.py new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.17.1
✗ patchtest: failure for selftests: add tests for INCOMPATIBLE_LICENSE
== Series Details ==
Series: selftests: add tests for INCOMPATIBLE_LICENSE
Revision: 1
URL : https://patchwork.openembedded.org/series/18089/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Errors in your Python code were encountered [test_pylint]
Suggested fix Correct the lines introduced by your patch
Output Please, fix the listed issues:
meta/lib/oeqa/selftest/cases/incompatible_lic.py does not exist
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe