From b7fec3e16f6a4af6380b7ff3c88078711c3ef3fb Mon Sep 17 00:00:00 2001 From: Ola x Nilsson Date: Wed, 13 Nov 2024 15:25:22 +0100 Subject: [PATCH] rsyslog: Fix the ptest path to test-driver Add a sed substitution for ${PTEST_PATH}/${TESTDIR}/Makefile that transforms LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver to LOG_DRIVER = $(SHELL) $(top_builddir)/test-driver SH_LOG_DRIVER = $(SHELL) $(top_builddir)/test-driver which is where the test-driver script can be found when installed. The addition of this substition makes ptests work with or without an automake patch in OE-Core that does the same thing. Relates to [YOCTO #15635] Signed-off-by: Ola x Nilsson Signed-off-by: Khem Raj --- .../rsyslog/rsyslog_8.2408.0.bb | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb index cf833de22c..7d151bb9dc 100644 --- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb +++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2408.0.bb @@ -100,16 +100,18 @@ do_install_ptest() { # some tests need to write to this directory as user 'daemon' chmod 777 -R ${D}${PTEST_PATH}/tests - # do NOT need to rebuild Makefile itself - sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # do NOT need to rebuild $(check_PROGRAMS) - sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # fix the srcdir, top_srcdir - sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # fix the abs_top_builddir - sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + sed -e '# do NOT need to rebuild Makefile itself' \ + -e 's/^Makefile:.*$/Makefile:/' \ + -e '# do NOT need to rebuild $(check_PROGRAMS)' \ + -e 's/^check-TESTS:.*$/check-TESTS:/' \ + -e '# fix the srcdir, top_srcdir' \ + -e 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' \ + -e 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' \ + -e '# fix the abs_top_builddir' \ + -e 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' \ + -e '# fix the path to test-driver' \ + -e '/^\(SH_\)\?LOG_DRIVER/s/(top_srcdir)/(top_builddir)/' \ + -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile # install test-driver install -m 644 ${S}/test-driver ${D}${PTEST_PATH}