camellia-test.c \
des-test.c des3-test.c des-compat-test.c \
md2-test.c md4-test.c md5-test.c md5-compat-test.c \
- memxor-test.c \
+ memxor-test.c gosthash94-test.c \
ripemd160-test.c \
+ salsa20-test.c \
sha1-test.c sha224-test.c sha256-test.c \
sha384-test.c sha512-test.c \
+ sha3-permute-test.c sha3-224-test.c sha3-256-test.c \
+ sha3-384-test.c sha3-512-test.c \
serpent-test.c twofish-test.c \
knuth-lfib-test.c \
- cbc-test.c ctr-test.c gcm-test.c hmac-test.c \
+ cbc-test.c ctr-test.c gcm-test.c hmac-test.c umac-test.c \
meta-hash-test.c meta-cipher-test.c meta-armor-test.c \
- buffer-test.c yarrow-test.c
+ buffer-test.c yarrow-test.c pbkdf2-test.c
TS_HOGWEED_SOURCES = sexp-test.c sexp-format-test.c \
rsa2sexp-test.c sexp2rsa-test.c \
bignum-test.c random-prime-test.c \
pkcs1-test.c \
rsa-test.c rsa-encrypt-test.c rsa-keygen-test.c \
- dsa-test.c dsa-keygen-test.c
+ dsa-test.c dsa-keygen-test.c \
+ ecc-mod-test.c ecc-modinv-test.c ecc-redc-test.c \
+ ecc-mul-g-test.c ecc-mul-a-test.c \
+ ecdsa-sign-test.c ecdsa-verify-test.c ecdsa-keygen-test.c
-TS_SOURCES = $(TS_NETTLE_SOURCES) @IF_HOGWEED@ $(TS_HOGWEED_SOURCES)
+TS_SOURCES = $(TS_NETTLE_SOURCES) $(TS_HOGWEED_SOURCES)
+CXX_SOURCES = cxx-test.cxx
TS_NETTLE = $(TS_NETTLE_SOURCES:.c=$(EXEEXT))
TS_HOGWEED = $(TS_HOGWEED_SOURCES:.c=$(EXEEXT))
TS_C = $(TS_NETTLE) @IF_HOGWEED@ $(TS_HOGWEED)
-TS_CXX = @CXX_TESTS@
+TS_CXX = @IF_CXX@ $(CXX_SOURCES:.cxx=$(EXEEXT))
TARGETS = $(TS_C) $(TS_CXX)
TS_SH = sexp-conv-test pkcs1-conv-test symbols-test
TS_ALL = $(TARGETS) $(TS_SH)
EXTRA_SOURCES = sha1-huge-test.c
EXTRA_TARGETS = $(EXTRA_SOURCES:.c=$(EXEEXT))
-SOURCES = $(TS_SOURCES) testutils.c
+# Includes all C source files, regardless of configuration
+SOURCES = $(TS_SOURCES) $(EXTRA_SOURCES) testutils.c
-DISTFILES = $(SOURCES) $(EXTRA_SOURCES) cxx-test.cxx Makefile.in .test-rules.make \
- $(TS_SH) run-tests teardown-env \
- gold-bug.txt testutils.h
+DISTFILES = $(SOURCES) $(CXX_SOURCES) Makefile.in .test-rules.make \
+ $(TS_SH) setup-env teardown-env \
+ gold-bug.txt testutils.h sha3.awk
all: $(TARGETS) $(EXTRA_TARGETS)
# explicit rule for each and every executable.
LIB_HOGWEED = @IF_HOGWEED@ -lhogweed
-TEST_OBJS = testutils.$(OBJEXT) $(LIB_HOGWEED) -lnettle $(LIBS)
+TEST_OBJS = testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
+ $(LIB_HOGWEED) -lnettle $(LIBS)
+
+../nettle-internal.$(OBJEXT):
+ ( cd .. && $(MAKE) nettle-internal.$(OBJEXT) )
.PHONY: test-rules
test-rules:
include $(srcdir)/.test-rules.make
-$(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) \
+$(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
../libnettle.a @IF_HOGWEED@ ../libhogweed.a
+# For use as, e.g.,
+#
+# make check EMULATOR='$(VALGRIND)'
+# make check EMULATOR='$(VALGRIND) --log-fd=3' 3>valgrind.log
+
+VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes
+
# The PATH update is for locating dlls on w*ndows.
-check: $(TS_ALL) $(srcdir)/run-tests
+check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
- $(srcdir)/run-tests $(TS_ALL)
+ EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \
+ $(top_srcdir)/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status
tags:
etags -o $(srcdir)/TAGS --include $(top_srcdir) $(srcdir)/*.c $(srcdir)/*.h
-@DEP_INCLUDE@ $(SOURCES:.c=.$(OBJEXT).d)
+# Includes dependency files for everything, including objects which
+# the current configuration will not build.
+DEP_FILES = $(SOURCES:.c=.$(OBJEXT).d) $(CXX_SOURCES:.cxx=.$(OBJEXT).d)
+@DEP_INCLUDE@ $(DEP_FILES)