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 \
30 file://debian/testsuite-ignore-elflint.diff \ 30 file://debian/testsuite-ignore-elflint.diff \
31 file://0001-skip-the-test-when-gcc-not-deployed.patch \ 31 file://0001-skip-the-test-when-gcc-not-deployed.patch \
32 file://run-ptest \ 32 file://run-ptest \
33 file://serial-tests.patch \ 33 file://ptest.patch \
34 " 34 "
35SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch \ 35SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch \
36 file://0001-fix-err-variable-and-function-conflicts.patch \ 36 file://0001-fix-err-variable-and-function-conflicts.patch \
@@ -43,10 +43,9 @@ inherit autotools gettext ptest
43 43
44EXTRA_OECONF = "--program-prefix=eu- --without-lzma" 44EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
45EXTRA_OECONF_append_class-native = " --without-bzlib" 45EXTRA_OECONF_append_class-native = " --without-bzlib"
46# gcc has been added to blacklist, we will find workaround solution 46RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}"
47RDEPENDS_${PN}-ptest = "libasm libelf bash"
48 47
49EXTRA_OECONF_append_class-target += "--enable-tests-rpath" 48EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
50 49
51do_install_append() { 50do_install_append() {
52 if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then 51 if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
@@ -56,14 +55,13 @@ do_install_append() {
56 55
57do_compile_ptest() { 56do_compile_ptest() {
58 cd ${B}/tests 57 cd ${B}/tests
59 oe_runmake buildtest-TESTS 58 oe_runmake buildtest-TESTS oecheck
60} 59}
61 60
62do_install_ptest() { 61do_install_ptest() {
63 if [ ${PTEST_ENABLED} = "1" ]; then 62 if [ ${PTEST_ENABLED} = "1" ]; then
64 cp -r ${S}/tests/ ${D}${PTEST_PATH} 63 cp -r ${S}/tests/ ${D}${PTEST_PATH}
65 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests 64 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
66 cp -r ${B}/src ${D}${PTEST_PATH}
67 cp -r ${B}/config.h ${D}${PTEST_PATH} 65 cp -r ${B}/config.h ${D}${PTEST_PATH}
68 cp -r ${B}/backends ${D}${PTEST_PATH} 66 cp -r ${B}/backends ${D}${PTEST_PATH}
69 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile 67 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 @@
1Changes to allow ptest to run standalone on target:
2
3a) Run the tests serially
4b) Use the standalone test mode which allows the tests to be run in their
5 'installled' locations on target (but not any of the standalone build pieces)
6c) We want to use the binaries from their installed locations so the run-subr
7 script needs tweaking to run them like that. The rpath conditional isn't
8 enough since we want the second entry in the case statement.
9d) Add an oecheck make target which we can use to build the test binaries we need
10
11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12
13Upstream-Status: Inappropriate [oe specific]
14
15Index: elfutils-0.176/configure.ac
16===================================================================
17--- elfutils-0.176.orig/configure.ac
18+++ elfutils-0.176/configure.ac
19@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 Th
20 AC_PREREQ(2.63) dnl Minimum Autoconf version required.
21
22 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
23-AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
24+AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
25 AM_MAINTAINER_MODE
26
27 AM_SILENT_RULES([yes])
28Index: elfutils-0.176/tests/Makefile.am
29===================================================================
30--- elfutils-0.176.orig/tests/Makefile.am
31+++ elfutils-0.176/tests/Makefile.am
32@@ -445,10 +445,10 @@ installed_TESTS_ENVIRONMENT = libdir=$(D
33 installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
34 installed $(tests_rpath) \
35 '$(program_transform_name)'
36-if STANDALONE
37+if !STANDALONE
38 TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
39 LOG_COMPILER = $(installed_LOG_COMPILER)
40-else !STANDALONE
41+else STANDALONE
42 TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
43 abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
44 abs_top_builddir=$(abs_top_builddir); \
45@@ -463,7 +463,7 @@ installcheck-local:
46 $(MAKE) $(AM_MAKEFLAGS) \
47 TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
48 LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
49-endif !STANDALONE
50+endif STANDALONE
51
52 if STANDALONE
53 libdw = -ldw
54@@ -612,3 +612,5 @@ check: check-am coverage
55 coverage:
56 -$(srcdir)/coverage.sh
57 endif
58+oecheck:
59+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
60Index: elfutils-0.176/tests/test-subr.sh
61===================================================================
62--- elfutils-0.176.orig/tests/test-subr.sh
63+++ elfutils-0.176/tests/test-subr.sh
64@@ -91,12 +91,6 @@ installed_testrun()
65 program="$1"
66 shift
67 case "$program" in
68- ${abs_builddir}/*)
69- if [ "x$elfutils_tests_rpath" != xno ]; then
70- echo >&2 installcheck not possible with --enable-tests-rpath
71- exit 77
72- fi
73- ;;
74 ${abs_top_builddir}/src/*)
75 program=${bindir}/`program_transform ${program##*/}`
76 ;;
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 @@
3#This script is used to run elfutils test suites 3#This script is used to run elfutils test suites
4cd tests 4cd tests
5 5
6make -k runtest-TESTS abs_srcdir=$PWD abs_builddir=$PWD bindir=$PWD/../src/ srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed 6make -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 @@
1From 48e111a17e8d5f10690716a63c17670f1406b56c Mon Sep 17 00:00:00 2001
2From: "Hongjun.Yang" <hongjun.yang@windriver.com>
3Date: Wed, 28 Oct 2015 13:24:54 +0800
4Subject: [PATCH] Add serial-tests support, ptest need it.
5
6Add serial-tests support, ptest need it.
7
8Upstream-Status: Inappropriate [oe specific]
9
10Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
11
12---
13 configure.ac | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/configure.ac b/configure.ac
17index b4e012d..2eb0417 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 The elfutils developers.])
21 AC_PREREQ(2.63) dnl Minimum Autoconf version required.
22
23 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
24-AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
25+AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
26 AM_MAINTAINER_MODE
27
28 AM_SILENT_RULES([yes])