ptest.patch 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Changes to allow ptest to run standalone on target:
  2. a) Run the tests serially
  3. b) Use the standalone test mode which allows the tests to be run in their
  4. 'installled' locations on target (but not any of the standalone build pieces)
  5. c) We want to use the binaries from their installed locations so the run-subr
  6. script needs tweaking to run them like that. The rpath conditional isn't
  7. enough since we want the second entry in the case statement.
  8. d) Add an oecheck make target which we can use to build the test binaries we need
  9. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  10. Upstream-Status: Inappropriate [oe specific]
  11. Index: elfutils-0.176/configure.ac
  12. ===================================================================
  13. --- elfutils-0.176.orig/configure.ac
  14. +++ elfutils-0.176/configure.ac
  15. @@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 Th
  16. AC_PREREQ(2.63) dnl Minimum Autoconf version required.
  17. dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
  18. -AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
  19. +AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
  20. AM_MAINTAINER_MODE
  21. AM_SILENT_RULES([yes])
  22. Index: elfutils-0.176/tests/Makefile.am
  23. ===================================================================
  24. --- elfutils-0.176.orig/tests/Makefile.am
  25. +++ elfutils-0.176/tests/Makefile.am
  26. @@ -445,10 +445,10 @@ installed_TESTS_ENVIRONMENT = libdir=$(D
  27. installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
  28. installed $(tests_rpath) \
  29. '$(program_transform_name)'
  30. -if STANDALONE
  31. +if !STANDALONE
  32. TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
  33. LOG_COMPILER = $(installed_LOG_COMPILER)
  34. -else !STANDALONE
  35. +else STANDALONE
  36. TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
  37. abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
  38. abs_top_builddir=$(abs_top_builddir); \
  39. @@ -463,7 +463,7 @@ installcheck-local:
  40. $(MAKE) $(AM_MAKEFLAGS) \
  41. TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
  42. LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
  43. -endif !STANDALONE
  44. +endif STANDALONE
  45. if STANDALONE
  46. libdw = -ldw
  47. @@ -612,3 +612,5 @@ check: check-am coverage
  48. coverage:
  49. -$(srcdir)/coverage.sh
  50. endif
  51. +oecheck:
  52. + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
  53. Index: elfutils-0.176/tests/test-subr.sh
  54. ===================================================================
  55. --- elfutils-0.176.orig/tests/test-subr.sh
  56. +++ elfutils-0.176/tests/test-subr.sh
  57. @@ -91,12 +91,6 @@ installed_testrun()
  58. program="$1"
  59. shift
  60. case "$program" in
  61. - ${abs_builddir}/*)
  62. - if [ "x$elfutils_tests_rpath" != xno ]; then
  63. - echo >&2 installcheck not possible with --enable-tests-rpath
  64. - exit 77
  65. - fi
  66. - ;;
  67. ${abs_top_builddir}/src/*)
  68. program=${bindir}/`program_transform ${program##*/}`
  69. ;;