diff mbox series

[meta-python,1/1] python3-pyroute2: fix ptest failure

Message ID 20230823094708.1500785-1-archana.polampalli@windriver.com
State Under Review
Headers show
Series [meta-python,1/1] python3-pyroute2: fix ptest failure | expand

Commit Message

Polampalli, Archana Aug. 23, 2023, 9:47 a.m. UTC
The ptest fails after python3-pyroute2 is upgraded to 0.7.9.

Fixes:
=================================================
tests/test_unit/test_iproute_match/test_match.py:10: in <module>
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
---

---
PASS: tests/test_unit/test_requests/test_route.py::test_empty_target[explicit-ipv4-newdst]
PASS: tests/test_unit/test_requests/test_route.py::test_empty_target[split-ipv4-newdst]

============================= 103 passed in 0.33s ==============================
DURATION: 0
END: /usr/lib/python3-pyroute2/ptest
2023-08-22T10:31
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
---
 meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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
 }