diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2025-06-06 22:58:09 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-09 17:43:41 +0100 |
| commit | dfaff44d8a7f04cb7cd7f2b3d16a924ed0f49061 (patch) | |
| tree | deedfbe172eb83d4b37502c7486bb411ce2237a6 /meta/recipes-devtools/m4 | |
| parent | e65d0d156de06d402feeee571c4b543c5221723a (diff) | |
| download | poky-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.inc | 5 | ||||
| -rw-r--r-- | meta/recipes-devtools/m4/m4/run-ptest | 2 |
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}'" | |||
| 27 | do_compile_ptest() { | 27 | do_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 | ||
| 33 | do_install_ptest() { | 33 | do_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 | ||
| 47 | do_install_ptest:append:libc-glibc() { | 44 | do_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 |
| 4 | cd tests | 4 | cd tests |
| 5 | make -k runtest-TESTS abs_aux_dir=../../@BP@/tests/build-aux abs_top_srcdir=../../@BP@/tests abs_srcdir=../../@BP@/tests top_srcdir=.. srcdir=. | 5 | make -k runtest-TESTS abs_aux_dir=./build-aux abs_top_srcdir=. abs_srcdir=. top_srcdir=.. srcdir=. |
