summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/m4
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2025-06-06 22:58:09 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-09 17:43:41 +0100
commitdfaff44d8a7f04cb7cd7f2b3d16a924ed0f49061 (patch)
treedeedfbe172eb83d4b37502c7486bb411ce2237a6 /meta/recipes-devtools/m4
parente65d0d156de06d402feeee571c4b543c5221723a (diff)
downloadpoky-dfaff44d8a7f04cb7cd7f2b3d16a924ed0f49061.tar.gz
m4: simplify path substitutions in ptest
There's no need to setup a fake 'source directory' and redirect the tests to it; rather it's possible to point them directly to ptest directory (this needs to be done twice, in Makefile substitutions, and as a C define during ptest compilation). This also eliminates the assumption that S and B are in the same directory (no longer true when S is in UNPACKDIR). (From OE-Core rev: 4df67f54cc4f98b63e465fba3dc41ac9813a033e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/m4')
-rw-r--r--meta/recipes-devtools/m4/m4-1.4.20.inc5
-rw-r--r--meta/recipes-devtools/m4/m4/run-ptest2
2 files changed, 2 insertions, 5 deletions
diff --git a/meta/recipes-devtools/m4/m4-1.4.20.inc b/meta/recipes-devtools/m4/m4-1.4.20.inc
index a31335f173..aad57b8b64 100644
--- a/meta/recipes-devtools/m4/m4-1.4.20.inc
+++ b/meta/recipes-devtools/m4/m4-1.4.20.inc
@@ -27,7 +27,7 @@ EXTRA_OEMAKE += "'infodir=${infodir}'"
27do_compile_ptest() { 27do_compile_ptest() {
28 cd ${B}/tests 28 cd ${B}/tests
29 sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile 29 sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile
30 oe_runmake buildtest-TESTS 30 oe_runmake CPPFLAGS="-DSRCDIR=\\\"${PTEST_PATH}/tests/\\\"" buildtest-TESTS
31} 31}
32 32
33do_install_ptest() { 33do_install_ptest() {
@@ -39,9 +39,6 @@ do_install_ptest() {
39 chmod 0755 ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \ 39 chmod 0755 ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
40 ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \ 40 ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \
41 ${D}${PTEST_PATH}/tests/test-xalloc-die 41 ${D}${PTEST_PATH}/tests/test-xalloc-die
42
43 ln -sf ptest ${D}${libdir}/${BPN}/${BP}
44 sed -i -e 's/@BP@/${BP}/g' ${D}${PTEST_PATH}/run-ptest
45} 42}
46 43
47do_install_ptest:append:libc-glibc() { 44do_install_ptest:append:libc-glibc() {
diff --git a/meta/recipes-devtools/m4/m4/run-ptest b/meta/recipes-devtools/m4/m4/run-ptest
index a91c372e54..da786e26f4 100644
--- a/meta/recipes-devtools/m4/m4/run-ptest
+++ b/meta/recipes-devtools/m4/m4/run-ptest
@@ -2,4 +2,4 @@
2# 2#
3#This script is used to run m4 test suites 3#This script is used to run m4 test suites
4cd tests 4cd tests
5make -k runtest-TESTS abs_aux_dir=../../@BP@/tests/build-aux abs_top_srcdir=../../@BP@/tests abs_srcdir=../../@BP@/tests top_srcdir=.. srcdir=. 5make -k runtest-TESTS abs_aux_dir=./build-aux abs_top_srcdir=. abs_srcdir=. top_srcdir=.. srcdir=.