Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | Changes to allow ptest to run standalone on target: |
| 2 | |
| 3 | a) Run the tests serially |
| 4 | b) 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) |
| 6 | c) 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. |
| 9 | d) Add an oecheck make target which we can use to build the test binaries we need |
| 10 | |
| 11 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 12 | |
| 13 | Upstream-Status: Inappropriate [oe specific] |
| 14 | |
| 15 | Index: 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]) |
| 28 | Index: 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) |
| 60 | Index: 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 | ;; |