diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2023-12-19 10:47:14 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-21 10:38:30 +0000 |
commit | a84a8ac625ef0e4bf5672a054fd3c0b4cb6cf429 (patch) | |
tree | 0dcb4ddae36f7a1eca407d770b101e00f71595bb | |
parent | bc8ca0bacc913aea7fe16982f04074f36e61f800 (diff) | |
download | poky-a84a8ac625ef0e4bf5672a054fd3c0b4cb6cf429.tar.gz |
python3-license-expression: Fix the ptest failure
Fix the below ptest failure:
self = <test_skeleton_codestyle.BaseTests testMethod=test_skeleton_codestyle>
def test_skeleton_codestyle(self):
"""
This test shouldn't run in proliferated repositories.
"""
setup_cfg = configparser.ConfigParser()
setup_cfg.read("setup.cfg")
> if setup_cfg["metadata"]["name"] != "skeleton":
tests/test_skeleton_codestyle.py:22:
self = <configparser.ConfigParser object at 0x7fd87cf55110>, key = 'metadata'
def _getitem_(self, key):
if key != self.default_section and not self.has_section(key):
> raise KeyError(key)
E KeyError: 'metadata'
After the patch:
# ./run-ptest
[snip]
PASS: tests/test_license_expression.py::LicensingValidateTest::test_validation_bad_syntax
PASS: tests/test_license_expression.py::LicensingValidateTest::test_validation_exception_as_regular_key
PASS: tests/test_license_expression.py::LicensingValidateTest::test_validation_exception_with_choice
PASS: tests/test_license_expression.py::LicensingValidateTest::test_validation_invalid_license_exception
PASS: tests/test_license_expression.py::LicensingValidateTest::test_validation_invalid_license_exception_strict_false
PASS: tests/test_license_expression.py::LicensingValidateTest::test_validation_invalid_license_key
PASS: tests/test_license_expression.py::UtilTest::test_build_licensing
PASS: tests/test_license_expression.py::UtilTest::test_build_spdx_licensing
PASS: tests/test_license_expression.py::UtilTest::test_get_license_key_info
PASS: tests/test_license_expression.py::UtilTest::test_get_license_key_info_vendored
PASS: tests/test_license_expression.py::CombineExpressionTest::test_combine_expressions_with_duplicated_elements
PASS: tests/test_license_expression.py::CombineExpressionTest::test_combine_expressions_with_empty_input
PASS: tests/test_license_expression.py::CombineExpressionTest::test_combine_expressions_with_or_relationship
PASS: tests/test_license_expression.py::CombineExpressionTest::test_combine_expressions_with_regular
PASS: tests/test_skeleton_codestyle.py::BaseTests::test_skeleton_codestyle
============================================================================
Testsuite summary
# TOTAL: 175
# PASS: 175
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
(From OE-Core rev: 6b06ad7a9f1dd5900483102f5723a6821f961dab)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Changed in v4:
Add python3-license-expression to PTESTS_FAST
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python3-license-expression/run-ptest | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-license-expression_30.1.1.bb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python3-license-expression/run-ptest b/meta/recipes-devtools/python/python3-license-expression/run-ptest index 5cec711696..8d2017d39c 100644 --- a/meta/recipes-devtools/python/python3-license-expression/run-ptest +++ b/meta/recipes-devtools/python/python3-license-expression/run-ptest | |||
@@ -1,3 +1,3 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | pytest | 3 | pytest --automake |
diff --git a/meta/recipes-devtools/python/python3-license-expression_30.1.1.bb b/meta/recipes-devtools/python/python3-license-expression_30.1.1.bb index 31fb88d6e5..92ca419e4a 100644 --- a/meta/recipes-devtools/python/python3-license-expression_30.1.1.bb +++ b/meta/recipes-devtools/python/python3-license-expression_30.1.1.bb | |||
@@ -26,6 +26,7 @@ SRC_URI += " \ | |||
26 | 26 | ||
27 | RDEPENDS:${PN}-ptest += " \ | 27 | RDEPENDS:${PN}-ptest += " \ |
28 | ${PYTHON_PN}-pytest \ | 28 | ${PYTHON_PN}-pytest \ |
29 | ${PYTHON_PN}-unittest-automake-output \ | ||
29 | " | 30 | " |
30 | 31 | ||
31 | do_install_ptest() { | 32 | do_install_ptest() { |
@@ -33,4 +34,5 @@ do_install_ptest() { | |||
33 | install -d ${D}${PTEST_PATH}/src | 34 | install -d ${D}${PTEST_PATH}/src |
34 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ | 35 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ |
35 | cp -rf ${S}/src/* ${D}${PTEST_PATH}/src/ | 36 | cp -rf ${S}/src/* ${D}${PTEST_PATH}/src/ |
37 | cp -rf ${S}/setup.cfg ${D}${PTEST_PATH}/ | ||
36 | } | 38 | } |