summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2016-10-22 03:28:14 +0300
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2016-10-25 14:42:37 +0300
commit23fe17ceb8e1d1d4c2a72d553a70d104b0591479 (patch)
tree79a0d4be1b9f6ef62eed4a44205ff23dff3022a5
parentd96257147860ef1e3b48023352b62c165ab8b89d (diff)
downloadgnutls-23fe17ceb8e1d1d4c2a72d553a70d104b0591479.tar.gz
Fix compilation of tests if nettle is not installed in standard path
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/slow/Makefile.am6
-rw-r--r--tests/slow/cipher-override2.c13
-rw-r--r--tests/suite/Makefile.am2
4 files changed, 15 insertions, 14 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a0a85afe5e..733ece75be 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -208,6 +208,9 @@ if ENABLE_DANE
ctests += dane
endif
+rsa_illegal_import_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS)
+
+mini_alignment_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS)
mini_alignment_LDADD = $(LDADD) $(NETTLE_LIBS)
if ENABLE_OPENSSL
@@ -232,6 +235,7 @@ endif
endif
gc_CPPFLAGS = $(CPPFLAGS) \
+ $(NETTLE_CFLAGS) \
-I$(top_srcdir)/lib/includes \
-I$(top_builddir)/lib/includes \
-I$(top_srcdir)/lib/minitasn1 \
@@ -240,6 +244,7 @@ gc_CPPFLAGS = $(CPPFLAGS) \
-I$(top_builddir)/gl
mpi_CPPFLAGS = $(CPPFLAGS) \
+ $(NETTLE_CFLAGS) \
-I$(top_srcdir)/lib/includes \
-I$(top_builddir)/lib/includes \
-I$(top_srcdir)/lib/minitasn1 \
@@ -248,6 +253,7 @@ mpi_CPPFLAGS = $(CPPFLAGS) \
-I$(top_builddir)/gl
atfork_CPPFLAGS = $(CPPFLAGS) \
+ $(NETTLE_CFLAGS) \
-I$(top_srcdir)/lib/includes \
-I$(top_builddir)/lib/includes \
-I$(top_srcdir)/lib/minitasn1 \
@@ -256,6 +262,7 @@ atfork_CPPFLAGS = $(CPPFLAGS) \
-I$(top_builddir)/gl
pkcs12_s2k_CPPFLAGS = $(CPPFLAGS) \
+ $(NETTLE_CFLAGS) \
-I$(top_srcdir)/lib/includes \
-I$(top_builddir)/lib/includes \
-I$(top_srcdir)/lib/minitasn1 \
@@ -264,6 +271,7 @@ pkcs12_s2k_CPPFLAGS = $(CPPFLAGS) \
-I$(top_builddir)/gl
name_constraints_merge_CPPFLAGS = $(CPPFLAGS) \
+ $(NETTLE_CFLAGS) \
-I$(top_srcdir)/lib/includes \
-I$(top_builddir)/lib/includes \
-I$(top_srcdir)/lib/minitasn1 \
diff --git a/tests/slow/Makefile.am b/tests/slow/Makefile.am
index ef65a43d30..65c8a4297a 100644
--- a/tests/slow/Makefile.am
+++ b/tests/slow/Makefile.am
@@ -35,14 +35,18 @@ LDADD = ../libutils.la \
$(top_builddir)/lib/libgnutls.la $(LIBSOCKET)
if !ENABLE_SELF_CHECKS
-cipher_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/lib/
+cipher_test_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS) -I$(top_builddir)/lib/
+cipher_override2_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS) -I$(top_builddir)/lib/
else
cipher_test_CPPFLAGS = $(AM_CPPFLAGS)
+cipher_override2_CPPFLAGS = $(AM_CPPFLAGS)
endif
ctests = gendh
if ENABLE_NETTLE
+cipher_override_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS) $(HOGWEED_CFLAGS)
+mac_override_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS) $(HOGWEED_CFLAGS)
cipher_override_LDFLAGS = $(NETTLE_LIBS) $(HOGWEED_LIBS) $(GMP_LIBS) $(LDADD)
mac_override_LDFLAGS = $(NETTLE_LIBS) $(HOGWEED_LIBS) $(GMP_LIBS) $(LDADD)
endif
diff --git a/tests/slow/cipher-override2.c b/tests/slow/cipher-override2.c
index 3ed71186ae..c7c2842eee 100644
--- a/tests/slow/cipher-override2.c
+++ b/tests/slow/cipher-override2.c
@@ -8,17 +8,6 @@
#include <gnutls/crypto.h>
#include <gnutls/self-test.h>
-#ifndef HAVE_LIBNETTLE
-int main(int argc, char **argv)
-{
- exit(77);
-}
-#else
-
-# include <nettle/aes.h>
-# include <nettle/cbc.h>
-# include <nettle/gcm.h>
-
/* this tests whether the API to override ciphers works sanely,
* when GNUTLS_E_NEED_FALLBACK is used.
*/
@@ -157,5 +146,3 @@ int main(int argc, char **argv)
gnutls_global_deinit();
return 0;
}
-
-#endif
diff --git a/tests/suite/Makefile.am b/tests/suite/Makefile.am
index 00f4aa6080..afcb0312e4 100644
--- a/tests/suite/Makefile.am
+++ b/tests/suite/Makefile.am
@@ -131,6 +131,8 @@ endif
TESTS = $(nodist_check_SCRIPTS) prime-check
+prime_check_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS)
+
TEST_EXTENSIONS = .sh
if WANT_TEST_SUITE