0003-configure-add-option-to-disable-tests.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From 3c3ed2ecbf31d41b6e5406da55971b9d9eaa3388 Mon Sep 17 00:00:00 2001
  2. From: Bernd Kuhls <bernd@kuhls.net>
  3. Date: Mon, 24 Jul 2023 22:28:11 +0200
  4. Subject: [PATCH] configure: add option to disable tests
  5. Upstream: https://github.com/OpenSC/OpenSC/pull/2822
  6. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  7. ---
  8. configure.ac | 9 +++++++++
  9. src/Makefile.am | 6 +++++-
  10. 2 files changed, 14 insertions(+), 1 deletion(-)
  11. diff --git a/configure.ac b/configure.ac
  12. index 0a90445b..9b7543da 100644
  13. --- a/configure.ac
  14. +++ b/configure.ac
  15. @@ -272,6 +272,13 @@ AC_ARG_ENABLE(
  16. [enable_doc="no"]
  17. )
  18. +AC_ARG_ENABLE(
  19. + [tests],
  20. + [AS_HELP_STRING([--enable-tests],[enable tests @<:@enabled@:>@])],
  21. + ,
  22. + [enable_tests="yes"]
  23. +)
  24. +
  25. AC_ARG_ENABLE(
  26. [dnie-ui],
  27. [AS_HELP_STRING([--enable-dnie-ui],[enable use of external user interface program to request DNIe pin@<:@disabled@:>@])],
  28. @@ -1119,6 +1126,7 @@ AM_CONDITIONAL([ENABLE_NOTIFY], [test "${enable_notify}" = "yes"])
  29. AM_CONDITIONAL([ENABLE_CRYPTOTOKENKIT], [test "${enable_cryptotokenkit}" = "yes"])
  30. AM_CONDITIONAL([ENABLE_OPENCT], [test "${enable_openct}" = "yes"])
  31. AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"])
  32. +AM_CONDITIONAL([ENABLE_TESTS], [test "${enable_tests}" = "yes"])
  33. AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
  34. AM_CONDITIONAL([CYGWIN], [test "${CYGWIN}" = "yes"])
  35. AM_CONDITIONAL([ENABLE_MINIDRIVER], [test "${enable_minidriver}" = "yes"])
  36. @@ -1213,6 +1221,7 @@ XSL stylesheets: ${xslstylesheetsdir}
  37. man support: ${enable_man}
  38. doc support: ${enable_doc}
  39. +tests: ${enable_tests}
  40. thread locking support: ${enable_thread_locking}
  41. zlib support: ${enable_zlib}
  42. readline support: ${enable_readline}
  43. diff --git a/src/Makefile.am b/src/Makefile.am
  44. index 3ce465bf..bf71b61f 100644
  45. --- a/src/Makefile.am
  46. +++ b/src/Makefile.am
  47. @@ -3,7 +3,11 @@ EXTRA_DIST = Makefile.mak
  48. # Order IS important
  49. SUBDIRS = common scconf ui pkcs15init sm \
  50. - libopensc pkcs11 tools minidriver tests
  51. + libopensc pkcs11 tools minidriver
  52. +
  53. +if ENABLE_TESTS
  54. +SUBDIRS += tests
  55. +endif
  56. if ENABLE_SM
  57. SUBDIRS += smm
  58. --
  59. 2.39.2