diff mbox series

[v2,4/6] parted: Fix the ptest path to test-driver

Message ID 20241113144547.3121036-5-olani@axis.com
State New
Headers show
Series Remove automake patch that changes path to test-driver | expand

Commit Message

Ola x Nilsson Nov. 13, 2024, 2:45 p.m. UTC
From: Ola x Nilsson <olani@axis.com>

Add a sed substitution for ${PTEST_PATH}/tests/Makefile that transforms
 SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
to
 SH_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver
which is where the test-driver script can be found when installed.

There used to be an oe-core automake patch to do this, but it
broke non-ptest use of automake.

Relates to [YOCTO #15635]

Signed-off-by: Ola x Nilsson <olani@axis.com>
---
 meta/recipes-extended/parted/parted_3.6.bb | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-extended/parted/parted_3.6.bb b/meta/recipes-extended/parted/parted_3.6.bb
index a537ef74dba..fae35815be9 100644
--- a/meta/recipes-extended/parted/parted_3.6.bb
+++ b/meta/recipes-extended/parted/parted_3.6.bb
@@ -35,13 +35,15 @@  do_install_ptest() {
 	cp ${B}/tests/Makefile $t/tests/
 	mkdir $t/lib
 	cp ${B}/lib/config.h $t/lib
-	sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile
-	sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile
-	sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile
-	sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" $t/tests/Makefile
-	sed -i "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" $t/tests/Makefile
-	sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile
-	sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile
+	sed -e "s|^VERSION.*|VERSION = ${PV}|g" \
+	    -e "s|^srcdir =.*|srcdir = \.|g" \
+	    -e "s|^abs_srcdir =.*|abs_srcdir = \.|g" \
+	    -e "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" \
+	    -e "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" \
+	    -e "/^SH_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \
+	    -e "s|^Makefile:.*|Makefile:|g" \
+	    -e "/^BUILDINFO.*$/d" \
+	    -i $t/tests/Makefile
 	for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \
 	  do cp ${B}/tests/.libs/$i $t/tests/; \
 	done