]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
attr: Fix the ptest path to test-driver
authorOla x Nilsson <olani@axis.com>
Wed, 13 Nov 2024 14:45:43 +0000 (15:45 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Nov 2024 11:56:44 +0000 (11:56 +0000)
Add a sed substitution for ${PTEST_PATH}/Makefile that transforms
 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
to
 TEST_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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/attr/attr.inc

index 60339344015d88abccdaee0d8fb899ee0bdf0dd4..5d6929fe5074097b36fc56736efe1ed6e37d6931 100644 (file)
@@ -42,10 +42,13 @@ do_install_ptest() {
             -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
             -i ${D}${PTEST_PATH}/Makefile
 
-        sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
-        sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
-        sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile
-        sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile
+       sed -e "s|^srcdir =.*|srcdir = .|" \
+           -e "s|^abs_srcdir =.*|abs_srcdir = .|" \
+           -e "s|^abs_top_srcdir =.*|abs_top_srcdir = ..|" \
+           -e "s|^Makefile:.*|Makefile:|" \
+           -e "/^TEST_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \
+           -i ${D}${PTEST_PATH}/Makefile
+
        cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}
        cp -rf ${S}/test/ ${D}${PTEST_PATH}
 }