Message ID | 20231218091332.3090320-1-mingli.yu@windriver.com |
---|---|
State | Accepted, archived |
Commit | 6b06ad7a9f1dd5900483102f5723a6821f961dab |
Headers | show |
Series | [v3] python3-license-expression: Fix the ptest failure | expand |
On Mon, 18 Dec 2023 at 10:13, Yu, Mingli <mingli.yu@eng.windriver.com> wrote: > > From: Mingli Yu <mingli.yu@windriver.com> > > 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' I went and checked why this isn't seen on the autobulder - this ptest is actually excluded from testing because it's in PTESTS_PROBLEMS. Please add it to PTESTS_FAST (if it's quick enough), and then it's good. Alex
yes, the python3-license-expression ptest is fast and v4 sent to add python3-license-expression to PTESTS_FAST. Thanks,
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 @@ #!/bin/sh -pytest +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 += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { @@ -33,4 +34,5 @@ do_install_ptest() { install -d ${D}${PTEST_PATH}/src cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ cp -rf ${S}/src/* ${D}${PTEST_PATH}/src/ + cp -rf ${S}/setup.cfg ${D}${PTEST_PATH}/ }