0001-Add-disable-tests-option.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From 051d9cfe8f365e30affc6476ed79b9e04a6b15ad Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Fri, 4 Nov 2022 00:27:50 +0100
  4. Subject: [PATCH] Add --disable-tests option
  5. Add --disable-tests to allow the user to disable tests. As a
  6. side-effect, this will avoid the following build failure when check is
  7. found:
  8. libstat_wrapper.c:11:10: fatal error: gnu/lib-names.h: No such file or directory
  9. 11 | #include <gnu/lib-names.h>
  10. | ^~~~~~~~~~~~~~~~~
  11. This build failure is raised since version 2.0.5 and
  12. https://github.com/ClusterLabs/libqb/commit/78df90b180740712d0c90b6d982b78241cc99d72
  13. Fixes:
  14. - http://autobuild.buildroot.org/results/450cfc36d4fd6dc71c138bec45f05b5a2d92a08d
  15. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  16. [Upstream status: https://github.com/ClusterLabs/libqb/pull/475]
  17. ---
  18. Makefile.am | 6 +++++-
  19. configure.ac | 5 +++++
  20. 2 files changed, 10 insertions(+), 1 deletion(-)
  21. diff --git a/Makefile.am b/Makefile.am
  22. index a08b1d2..6a710a0 100644
  23. --- a/Makefile.am
  24. +++ b/Makefile.am
  25. @@ -39,7 +39,11 @@ ACLOCAL_AMFLAGS = -I m4
  26. dist_doc_DATA = COPYING INSTALL README.markdown
  27. -SUBDIRS = include lib doxygen2man docs tools tests examples
  28. +SUBDIRS = include lib doxygen2man docs tools examples
  29. +
  30. +if ENABLE_TESTS
  31. +SUBDIRS += tests
  32. +endif
  33. dist-clean-local:
  34. rm -f .snapshot-version autoconf automake autoheader
  35. diff --git a/configure.ac b/configure.ac
  36. index ac44b7e..4946008 100644
  37. --- a/configure.ac
  38. +++ b/configure.ac
  39. @@ -562,6 +562,11 @@ AC_ARG_WITH([force-sockets-config-file],
  40. [ FORCESOCKETSFILE="$withval" ],
  41. [ FORCESOCKETSFILE="$sysconfdir/libqb/force-filesystem-sockets" ])
  42. +AC_ARG_ENABLE([tests],
  43. + [AS_HELP_STRING([--disable-tests],[disable tests])],,
  44. + [ enable_tests="yes" ])
  45. +AM_CONDITIONAL([ENABLE_TESTS], [test x$enable_tests = xyes])
  46. +
  47. AC_ARG_ENABLE([install-tests],
  48. [AS_HELP_STRING([--enable-install-tests],[install tests])],,
  49. [ enable_install_tests="no" ])
  50. --
  51. 2.35.1