All of lore.kernel.org
 help / color / mirror / Atom feed
From: <olani@axis.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [RFC PATCH 1/5] attr: Fix the ptest path to test-driver
Date: Mon, 11 Nov 2024 09:35:37 +0100	[thread overview]
Message-ID: <20241111083541.291594-2-olani@axis.com> (raw)
In-Reply-To: <20241111083541.291594-1-olani@axis.com>

From: Ola x Nilsson <olani@axis.com>

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]
---
 meta/recipes-support/attr/attr.inc | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index 60339344015..5d6929fe507 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -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}
 }
-- 
2.39.5



  reply	other threads:[~2024-11-11  8:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11  8:35 [RFC PATCH 0/5] Remove automake patch that changes path to test-driver olani
2024-11-11  8:35 ` olani [this message]
2024-11-12  9:35   ` [OE-core] [RFC PATCH 1/5] attr: Fix the ptest " Richard Purdie
2024-11-13  8:37     ` Ola x Nilsson
2024-11-11  8:35 ` [RFC PATCH 2/5] sed: " olani
2024-11-11  8:35 ` [RFC PATCH 3/5] parted: " olani
2024-11-11  8:35 ` [RFC PATCH 4/5] strace: " olani
2024-11-11  8:35 ` [RFC PATCH 5/5] automake: Remove patch that changes " olani
2024-11-11 10:52 ` [OE-core] [RFC PATCH 0/5] Remove automake " Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241111083541.291594-2-olani@axis.com \
    --to=olani@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.