@@ -60,7 +60,7 @@ do_compile_ptest() {
cxxflags="$(makefile-getvar Makefile CXXFLAGS) -Wno-error"
# test-nlist has a custom rule using test_nlist_CFLAGS (-g -O0), which lacks
# the debug prefix maps and leaks build paths; use the standard CFLAGS
- oe_runmake buildtest-TESTS oecheck "CFLAGS=$cflags" "CXXFLAGS=$cxxflags" \
+ oe_runmake oecheck "CFLAGS=$cflags" "CXXFLAGS=$cxxflags" \
'test_nlist_CFLAGS=$(CFLAGS)'
}
PTEST_PARALLEL_MAKE = ""
@@ -107,6 +107,7 @@ do_install_ptest() {
cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
cp -r ${B}/config.h ${D}${PTEST_PATH}
cp -r ${B}/config/profile.sh ${D}${PTEST_PATH}/config
+ cp ${S}/config/test-driver ${D}${PTEST_PATH}/config
cp -r ${B}/backends ${D}${PTEST_PATH}
cp -r ${B}/debuginfod ${D}${PTEST_PATH}
sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
@@ -3,36 +3,21 @@ From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 1 May 2019 16:37:48 +0100
Subject: [PATCH] Changes to allow ptest to run standalone on target:
-a) Run the tests serially
-b) Use the standalone test mode which allows the tests to be run in their
+a) Use the standalone test mode which allows the tests to be run in their
'installled' locations on target (but not any of the standalone build pieces)
-c) We want to use the binaries from their installed locations so the run-subr
+b) We want to use the binaries from their installed locations so the run-subr
script needs tweaking to run them like that. The rpath conditional isn't
enough since we want the second entry in the case statement.
-d) Add an oecheck make target which we can use to build the test binaries we need
+c) Add an oecheck make target which we can use to build the test binaries we need
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Upstream-Status: Inappropriate [oe specific]
---
- configure.ac | 2 +-
tests/Makefile.am | 2 ++
tests/test-subr.sh | 6 ------
- 3 files changed, 3 insertions(+), 7 deletions(-)
+ 2 files changed, 2 insertions(+), 6 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index d3c0292..76bdda2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -43,7 +43,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2026 The elfutils developers.])
- AC_PREREQ(2.69) dnl Minimum Autoconf version required.
-
- dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
--AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
-+AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
- AM_MAINTAINER_MODE
-
- AM_SILENT_RULES([yes])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 261649f..bb36d3a 100644
--- a/tests/Makefile.am
@@ -3,4 +3,9 @@
#This script is used to run elfutils test suites
cd tests
-make -k installcheck-local CC=gcc abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-, XFAIL_TESTS="@XFAIL_TESTS@"
+make -k installcheck-local CC=gcc AWK=awk abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-, XFAIL_TESTS="@XFAIL_TESTS@" || {
+ rc=$?
+ # The parallel harness writes test output to log files; show it on failure
+ [ -f test-suite.log ] && cat test-suite.log
+ exit $rc
+}
run-ptest uses installcheck-local, so serial-tests is no longer needed. Install config/test-driver, pass AWK=awk and print test-suite.log on failure. core-image-ptest-elfutils on qemux86-64, passed before -> after: glibc: 261 -> 257, 0 failed musl: 254 -> 250, 0 failed The 4 dropped passes were PASS: lines printed by elf-from-memory and ar-getarsym-mem, miscounted as tests. Both still run and pass. AI-Generated: Uses Kiro CLI (claude-opus-5.5) Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- .../elfutils/elfutils_0.197.bb | 3 ++- .../elfutils/files/ptest.patch | 23 ++++--------------- .../recipes-devtools/elfutils/files/run-ptest | 7 +++++- 3 files changed, 12 insertions(+), 21 deletions(-)