summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.176.bb10
-rw-r--r--meta/recipes-devtools/elfutils/files/ptest.patch76
-rw-r--r--meta/recipes-devtools/elfutils/files/run-ptest2
-rw-r--r--meta/recipes-devtools/elfutils/files/serial-tests.patch28
4 files changed, 81 insertions, 35 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/meta/recipes-devtools/elfutils/elfutils_0.176.bb
index fb2868723a..19d27cd992 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.176.bb
@@ -30,7 +30,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://debian/testsuite-ignore-elflint.diff \
file://0001-skip-the-test-when-gcc-not-deployed.patch \
file://run-ptest \
- file://serial-tests.patch \
+ file://ptest.patch \
"
SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch \
file://0001-fix-err-variable-and-function-conflicts.patch \
@@ -43,10 +43,9 @@ inherit autotools gettext ptest
EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
EXTRA_OECONF_append_class-native = " --without-bzlib"
-# gcc has been added to blacklist, we will find workaround solution
-RDEPENDS_${PN}-ptest = "libasm libelf bash"
+RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}"
-EXTRA_OECONF_append_class-target += "--enable-tests-rpath"
+EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
do_install_append() {
if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
@@ -56,14 +55,13 @@ do_install_append() {
do_compile_ptest() {
cd ${B}/tests
- oe_runmake buildtest-TESTS
+ oe_runmake buildtest-TESTS oecheck
}
do_install_ptest() {
if [ ${PTEST_ENABLED} = "1" ]; then
cp -r ${S}/tests/ ${D}${PTEST_PATH}
cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
- cp -r ${B}/src ${D}${PTEST_PATH}
cp -r ${B}/config.h ${D}${PTEST_PATH}
cp -r ${B}/backends ${D}${PTEST_PATH}
sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
diff --git a/meta/recipes-devtools/elfutils/files/ptest.patch b/meta/recipes-devtools/elfutils/files/ptest.patch
new file mode 100644
index 0000000000..35b23f43b3
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/ptest.patch
@@ -0,0 +1,76 @@
+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
+ '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
+ 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
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Upstream-Status: Inappropriate [oe specific]
+
+Index: elfutils-0.176/configure.ac
+===================================================================
+--- elfutils-0.176.orig/configure.ac
++++ elfutils-0.176/configure.ac
+@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 Th
+ AC_PREREQ(2.63) 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])
+Index: elfutils-0.176/tests/Makefile.am
+===================================================================
+--- elfutils-0.176.orig/tests/Makefile.am
++++ elfutils-0.176/tests/Makefile.am
+@@ -445,10 +445,10 @@ installed_TESTS_ENVIRONMENT = libdir=$(D
+ installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ installed $(tests_rpath) \
+ '$(program_transform_name)'
+-if STANDALONE
++if !STANDALONE
+ TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+ LOG_COMPILER = $(installed_LOG_COMPILER)
+-else !STANDALONE
++else STANDALONE
+ TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+ abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
+ abs_top_builddir=$(abs_top_builddir); \
+@@ -463,7 +463,7 @@ installcheck-local:
+ $(MAKE) $(AM_MAKEFLAGS) \
+ TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+ LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
+-endif !STANDALONE
++endif STANDALONE
+
+ if STANDALONE
+ libdw = -ldw
+@@ -612,3 +612,5 @@ check: check-am coverage
+ coverage:
+ -$(srcdir)/coverage.sh
+ endif
++oecheck:
++ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+Index: elfutils-0.176/tests/test-subr.sh
+===================================================================
+--- elfutils-0.176.orig/tests/test-subr.sh
++++ elfutils-0.176/tests/test-subr.sh
+@@ -91,12 +91,6 @@ installed_testrun()
+ program="$1"
+ shift
+ case "$program" in
+- ${abs_builddir}/*)
+- if [ "x$elfutils_tests_rpath" != xno ]; then
+- echo >&2 installcheck not possible with --enable-tests-rpath
+- exit 77
+- fi
+- ;;
+ ${abs_top_builddir}/src/*)
+ program=${bindir}/`program_transform ${program##*/}`
+ ;;
diff --git a/meta/recipes-devtools/elfutils/files/run-ptest b/meta/recipes-devtools/elfutils/files/run-ptest
index 770a62e731..81b81f2f5d 100644
--- a/meta/recipes-devtools/elfutils/files/run-ptest
+++ b/meta/recipes-devtools/elfutils/files/run-ptest
@@ -3,4 +3,4 @@
#This script is used to run elfutils test suites
cd tests
-make -k runtest-TESTS abs_srcdir=$PWD abs_builddir=$PWD bindir=$PWD/../src/ srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed
+make -k runtest-TESTS 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-,
diff --git a/meta/recipes-devtools/elfutils/files/serial-tests.patch b/meta/recipes-devtools/elfutils/files/serial-tests.patch
deleted file mode 100644
index 4b448cd50a..0000000000
--- a/meta/recipes-devtools/elfutils/files/serial-tests.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 48e111a17e8d5f10690716a63c17670f1406b56c Mon Sep 17 00:00:00 2001
-From: "Hongjun.Yang" <hongjun.yang@windriver.com>
-Date: Wed, 28 Oct 2015 13:24:54 +0800
-Subject: [PATCH] Add serial-tests support, ptest need it.
-
-Add serial-tests support, ptest need it.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
-
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index b4e012d..2eb0417 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 The elfutils developers.])
- AC_PREREQ(2.63) 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])