python3-license-expression: Make the ptest work as expected
PATCH 1/1 python3-license-expression: Make the ptest work as expected
From: Mingli Yu <[email protected]>
After below commit introduced, the do_install_ptest function is defined concentratedly in ptest-python-pytest.bbclass.8d84d9e19b python3-*: Update recipes with pytest ptests to use the new ptest-python-pytest class
Use append for do_install_ptest to avoid the do_install_ptest logic defined in ptest-python-pytest.bbclass be overrided.
Before the patch:
# cd /usr/lib/python3-license-expression/ptest/ # ls setup.cfg src
After the patch:
# cd /usr/lib/python3-license-expression/ptest/ # ls run-ptest setup.cfg src tests # ./run-ptest PASS: tests/test__pyahocorasick.py:TestTrie.test_add_can_get PASS: tests/test__pyahocorasick.py:TestTrie.test_add_existing_WordShouldReplaceAssociatedValue PASS: tests/test__pyahocorasick.py:TestTrie.test_exists_ShouldDetectAddedWords PASS: tests/test__pyahocorasick.py:TestTrie.test_exists_ShouldReturnFailOnUnknownWord PASS: tests/test__pyahocorasick.py:TestTrie.test_get_UnknowWordWithDefaultValueShouldReturnDefault PASS: tests/test__pyahocorasick.py:TestTrie.test_get_UnknowWordWithoutDefaultValueShouldRaiseException PASS: tests/test__pyahocorasick.py:TestTrie.test_is_prefix_ShouldDetecAllPrefixesIncludingWord PASS: tests/test__pyahocorasick.py:TestTrie.test_items_ShouldReturnAllItemsAlreadyAddedToTheTrie PASS: tests/test__pyahocorasick.py:TestTrie.test_iter_should_can_return_non_matches_optionally PASS: tests/test__pyahocorasick.py:TestTrie.test_iter_should_not_return_non_matches_by_default PASS: tests/test__pyahocorasick.py:TestTrie.test_iter_simple [snip]
Signed-off-by Mingli Yu <[email protected]>
--- .../python/python3-license-expression_30.4.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-license-expression_30.4.1.bb +1 -1
@@ -22,7 +22,7 @@ RDEPENDS:${PN} += "\ BBCLASSEXTEND = "native nativesdk" -do_install_ptest() { +do_install_ptest:append() { install -d ${D}${PTEST_PATH}/src cp -rf ${S}/src/* ${D}${PTEST_PATH}/src/ cp -rf ${S}/setup.cfg ${D}${PTEST_PATH}/
Signature · 1 line
2.34.1
meta/recipes-devtools/python/python3-license-expression_30.4.1.bb RDEPENDS:${PN} += "\ · line 28
Quoted 5 lines · Mingli via lists.openembedded.org
meta/recipes-devtools/python/python3-license-expression_30.4.1.bb +1
-1-do_install_ptest() { +do_install_ptest:append() { install -d ${D}${PTEST_PATH}/src cp -rf ${S}/src/* ${D}${PTEST_PATH}/src/ cp -rf ${S}/setup.cfg ${D}${PTEST_PATH}/
I didn’t like how this test was installing the entire source tree again, so I just sent a patch to surgically install just what the tests need.
Ross