forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libu2f-server-1.0.1-tests-fix.patch
54 lines (46 loc) · 1.45 KB
/
libu2f-server-1.0.1-tests-fix.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Gokturk Yuksek <[email protected]>
Subject: [PATCH] Make tests with CHECK optional at configure time
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,15 @@
PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto], [], [])
-PKG_CHECK_MODULES([CHECK], [check], [], [])
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--enable-tests],
+ [use check to run the unit tests])],
+ [enable_tests=$enableval],
+ [enable_tests=no])
+AM_CONDITIONAL([ENABLE_TESTS],[test '!' "$enable_tests" = no])
+if test '!' "$enable_tests" = no; then
+ PKG_CHECK_MODULES([CHECK], [check], [], [AC_MSG_NOTICE(Check package not found `make check` won't work)])
+fi
AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage],
@@ -123,11 +131,15 @@
Makefile
gtk-doc/Makefile
src/Makefile
- tests/Makefile
u2f-server/Makefile
u2f-server/u2f-server-version.h
u2f-server/u2f-server.pc
])
+if test '!' "$enable_tests" = no; then
+ AC_CONFIG_FILES([
+ tests/Makefile
+ ])
+fi
AC_OUTPUT
AC_MSG_NOTICE([summary of build options:
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-SUBDIRS = u2f-server src tests gtk-doc
+SUBDIRS = u2f-server src gtk-doc
+
+if ENABLE_TESTS
+SUBDIRS+=tests
+endif
ACLOCAL_AMFLAGS = -I m4