0001-configure.ac-add-disable-tests.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From a1f8509283ad29b5144bda6f6dba9f5eb7165adc Mon Sep 17 00:00:00 2001
  2. From: Norbert Lange <nolange79@gmail.com>
  3. Date: Thu, 23 Dec 2021 21:56:46 +0100
  4. Subject: [PATCH] configure.ac: add --disable-tests
  5. Add configure option to disable tests.
  6. Upstream is not likely to accept it, see lttng-tools package.
  7. Signed-off-by: Norbert Lange <nolange79@gmail.com>
  8. ---
  9. Makefile.am | 5 ++++-
  10. configure.ac | 6 ++++++
  11. 2 files changed, 10 insertions(+), 1 deletion(-)
  12. diff --git a/Makefile.am b/Makefile.am
  13. index 9ab93ccd..8a1c1dca 100644
  14. --- a/Makefile.am
  15. +++ b/Makefile.am
  16. @@ -7,9 +7,12 @@ SUBDIRS = \
  17. src \
  18. tools \
  19. doc \
  20. - tests \
  21. extras
  22. +if ENABLE_TESTS
  23. +SUBDIRS += tests
  24. +endif
  25. +
  26. dist_doc_DATA = \
  27. ChangeLog \
  28. LICENSE \
  29. diff --git a/configure.ac b/configure.ac
  30. index b6254228..fe5f2700 100644
  31. --- a/configure.ac
  32. +++ b/configure.ac
  33. @@ -360,6 +360,11 @@ AE_FEATURE([python-agent],[build the LTTng UST Python agent])
  34. AE_FEATURE_DEFAULT_ENABLE
  35. AE_FEATURE([examples],[Do not build and install examples])
  36. +# Build the tests
  37. +# Enabled by default
  38. +AE_FEATURE_DEFAULT_ENABLE
  39. +AE_FEATURE([tests],[Do not build tests])
  40. +
  41. # Man pages
  42. # Enabled by default
  43. AE_FEATURE_DEFAULT_ENABLE
  44. @@ -525,6 +530,7 @@ AC_DEFINE([LTTNG_UST_CTL_LIB_SONAME_MAJOR], [ust_ctl_lib_version_current], [Majo
  45. ## ##
  46. AM_CONDITIONAL([ENABLE_EXAMPLES], AE_IS_FEATURE_ENABLED([examples]))
  47. +AM_CONDITIONAL([ENABLE_TESTS], AE_IS_FEATURE_ENABLED([tests]))
  48. AM_CONDITIONAL([ENABLE_GEN_TP_EXAMPLES], [test "x$PYTHON" != "x"])
  49. AM_CONDITIONAL([ENABLE_JAVA_AGENT], AE_IS_FEATURE_ENABLED([java-agent-jul]) || AE_IS_FEATURE_ENABLED([java-agent-log4j]))
  50. AM_CONDITIONAL([ENABLE_JAVA_AGENT_WITH_JUL], AE_IS_FEATURE_ENABLED([java-agent-jul]))
  51. --
  52. 2.34.1