Skip to contentSkip to conversation

cpio: fix ptest failure

PATCH New [email protected] 1 participant 1 message Mar 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpio: fix ptest failure

From: Changqing Li <[email protected]>

Fix following ptest failure:
/usr/lib64/cpio/ptest/run-ptest: line 7: cd: /usr/lib/cpio/ptest/tests/: No such file or directory

---
 meta/recipes-extended/cpio/cpio-2.13/run-ptest | 2 +-
 meta/recipes-extended/cpio/cpio_2.13.bb        | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/cpio/cpio-2.13/run-ptest +1 -1
index bdac7259c1..f027574e86 100644
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Define cpio test work dir
-WORKDIR=/usr/lib/cpio/ptest/tests/
+WORKDIR=@PTEST_PATH@/tests/
 
 # Run test
 cd ${WORKDIR}
meta/recipes-extended/cpio/cpio_2.13.bb +1 -0
index 7a3c8b308b..3350ba710e 100644
@@ -56,6 +56,7 @@ do_install_ptest() {
     install --mode=755 ${B}/tests/atlocal ${D}${PTEST_PATH}/tests/
     install --mode=755 ${B}/tests/genfile ${D}${PTEST_PATH}/tests/
     install --mode=755 ${S}/tests/testsuite ${D}${PTEST_PATH}/tests/
+    sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/run-ptest
 }
 
 PACKAGES =+ "${PN}-rmt"
Signature · 1 line
2.25.1