Makefile.am 1.22 KB
Newer Older
Niels Möller's avatar
Niels Möller committed
1 2
# Testsuite

3 4 5 6
# Don't optimize; gcc takes ages compiling large files like serpent-test.c

CFLAGS = @CFLAGS@ -O0

7
# Tests that can be used without any special setup.
8 9
TS_PROGS = arcfour-test des-test rijndael-test twofish-test \
           md5-test sha1-test rsa-test dsa-test spki-tag-test
Niels Möller's avatar
Niels Möller committed
10
TS_SH = keygen-test keygen-2-test
11 12 13 14

TS_SOME = $(TS_PROGS) $(TS_SH)

# Tests that require that lsh is set up for password-less login.
15
TS_MORE_SH = lsh-1-test lsh-2-test lsh-3-test lsh-4-test lsh-cat-test tcpip-local-test tcpip-remote-test
16 17 18 19 20 21
TS_MORE_PROGS =

TS_ALL = $(TS_PROGS) $(TS_SH) $(TS_MORE_PROGS) $(TS_MORE_SH) 

# Don't use automakes testsuite support
# TESTS = $(TS_PROGS) $(TS_SH)
22

Niels Möller's avatar
Niels Möller committed
23
# SUFFIXES = .c .o
24
noinst_PROGRAMS = $(TS_PROGS)
Niels Möller's avatar
Niels Möller committed
25

Niels Möller's avatar
Niels Möller committed
26
LDADD = ../liblsh.a ../symmetric/libsymmetric.a $(addprefix ../,@LIBARGP@)
Niels Möller's avatar
Niels Möller committed
27

28 29
EXTRA_DIST = macros.m4 $(SOURCES:.c=.m4) $(TS_SH) $(TS_MORE_SH) \
	functions.sh runtests key-1.private
30

Niels Möller's avatar
Niels Möller committed
31 32 33
all:
	@echo make check to build testprograms.

Niels Möller's avatar
Niels Möller committed
34
M4FLAGS = -P #-s
Niels Möller's avatar
Niels Möller committed
35
$(srcdir)/%.c: macros.m4 %.m4
Niels Möller's avatar
Niels Möller committed
36
	$(M4) $(M4FLAGS) $^ > $@T
Niels Möller's avatar
Niels Möller committed
37
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
38

Niels Möller's avatar
Niels Möller committed
39

40 41 42 43 44
.PHONY: check-some check-more

check: check-some

check-some: $(TS_SOME)
45
	srcdir=$(srcdir) $(srcdir)/runtests $(TS_SOME)
46 47

check-more: $(TS_ALL)
48
	srcdir=$(srcdir) $(srcdir)/runtests $(TS_ALL)
49