summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files/ptest.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-01 16:37:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-02 09:56:19 +0100
commit8c9e8fd0d15d76080e7f691280610b91f9cc4898 (patch)
tree02af1e7e664b7361f6ccb0025f8162fd390ac03b /meta/recipes-devtools/elfutils/files/ptest.patch
parent2fc30ac2a8f198edd6a6d447455ba38bba5d07ea (diff)
downloadpoky-8c9e8fd0d15d76080e7f691280610b91f9cc4898.tar.gz
elfutils: ptest fixes
Changes to improve the way ptest runs: 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) 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. c) Add an oecheck make target which we can use to build the test binaries we need d) Add missing -ptest package dependencies (needs coreutils, ${PN}, ${PN}-binutils, make) e) Don't add RPATH to the test binaries, we don't need that f) Add some extra parameters to the make command to ensure tests run correctly Before: ----------------------------------------------------- Recipe | Passed | Failed | Skipped | Time(s) ----------------------------------------------------- elfutils | 31 | 4 | 168 | 6 ----------------------------------------------------- After: ----------------------------------------------------- Recipe | Passed | Failed | Skipped | Time(s) ----------------------------------------------------- elfutils | 173 | 25 | 5 | 15 ----------------------------------------------------- (From OE-Core rev: 7ff76b86299289a4a5741f910399d95232f64f32) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/files/ptest.patch')
-rw-r--r--meta/recipes-devtools/elfutils/files/ptest.patch76
1 files changed, 76 insertions, 0 deletions
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 ;;