From 7bfbf9eee8b45ad294d1a79523e16bba5fab7a11 Mon Sep 17 00:00:00 2001 From: Archana Polampalli Date: Wed, 23 Aug 2023 09:47:08 +0000 Subject: python3-pyroute2: fix ptest failure The ptest fails after python3-pyroute2 is upgraded to 0.7.9. Fixes: ================================================= tests/test_unit/test_iproute_match/test_match.py:10: in with open('test_unit/test_iproute_match/links.dump', 'r') as f: E FileNotFoundError: [Errno 2] No such file or directory: 'test_unit/test_iproute_match/links.dump' with open(sample, 'r') as buf: E FileNotFoundError: [Errno 2] No such file or directory: 'test_unit/test_nlmsg/gre_01.dump' ================================================= root@qemux86-64:~# ptest-runner python3-pyroute2 START: ptest-runner 2023-08-22T10:31 BEGIN: /usr/lib/python3-pyroute2/ptest ============================= test session starts ============================== platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0 rootdir: /usr/lib/python3-pyroute2/ptest collected 103 items PASS: tests/test_unit/test_addr_pool.py::test_alloc_aligned PASS: tests/test_unit/test_addr_pool.py::test_alloc_odd Signed-off-by: Khem Raj --- meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb b/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb index 263acd06c..39fbd1a00 100644 --- a/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb +++ b/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb @@ -35,4 +35,6 @@ RDEPENDS:${PN}-ptest += " \ do_install_ptest() { install -d ${D}${PTEST_PATH}/tests cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + sed -e "s|'test_unit|'tests/test_unit|g" -i ${D}${PTEST_PATH}/tests/test_unit/test_nlmsg/test_marshal.py \ + ${D}${PTEST_PATH}/tests/test_unit/test_iproute_match/test_match.py } -- cgit v1.2.3-54-g00ecf