xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/elfutils/files/ptest.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From bfbf393e7d5b1b41df85ce1c37e887776c45d529 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Wed, 1 May 2019 16:37:48 +0100
4Subject: [PATCH] Changes to allow ptest to run standalone on target:
5
6a) Run the tests serially
7b) Use the standalone test mode which allows the tests to be run in their
8  'installled' locations on target (but not any of the standalone build pieces)
9c) We want to use the binaries from their installed locations so the run-subr
10   script needs tweaking to run them like that. The rpath conditional isn't
11   enough since we want the second entry in the case statement.
12d) Add an oecheck make target which we can use to build the test binaries we need
13
14Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
15
16Upstream-Status: Inappropriate [oe specific]
17
18---
19 configure.ac       | 2 +-
20 tests/Makefile.am  | 2 ++
21 tests/test-subr.sh | 6 ------
22 3 files changed, 3 insertions(+), 7 deletions(-)
23
24diff --git a/configure.ac b/configure.ac
25index d345495..67933d1 100644
26--- a/configure.ac
27+++ b/configure.ac
28@@ -48,7 +48,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2021 The elfutils developers.])
29 AC_PREREQ(2.63)			dnl Minimum Autoconf version required.
30
31 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
32-AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
33+AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
34 AM_MAINTAINER_MODE
35
36 AM_SILENT_RULES([yes])
37diff --git a/tests/Makefile.am b/tests/Makefile.am
38index 72afd0e..a2dfd43 100644
39--- a/tests/Makefile.am
40+++ b/tests/Makefile.am
41@@ -698,3 +698,5 @@ check: check-am coverage
42 coverage:
43 	-$(srcdir)/coverage.sh
44 endif
45+oecheck:
46+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
47diff --git a/tests/test-subr.sh b/tests/test-subr.sh
48index 411e5f2..a638ff9 100644
49--- a/tests/test-subr.sh
50+++ b/tests/test-subr.sh
51@@ -91,12 +91,6 @@ installed_testrun()
52   program="$1"
53   shift
54   case "$program" in
55-  ${abs_builddir}/*)
56-    if [ "x$elfutils_tests_rpath" != xno ]; then
57-      echo >&2 installcheck not possible with --enable-tests-rpath
58-      exit 77
59-    fi
60-    ;;
61   ${abs_top_builddir}/src/*)
62     program=${bindir}/`program_transform ${program##*/}`
63     ;;
64