Fix buildsytem to always include config.h.
[platform/upstream/cryptsetup.git] / tests / Makefile.am
1 TESTS = api-test \
2         compat-test \
3         loopaes-test \
4         align-test \
5         discards-test \
6         mode-test \
7         password-hash-test \
8         tcrypt-compat-test
9
10 if VERITYSETUP
11 TESTS += verity-compat-test
12 endif
13
14 if REENCRYPT
15 TESTS += reencryption-compat-test
16 endif
17
18 EXTRA_DIST = compatimage.img.bz2 compatv10image.img.bz2 \
19         valid_header_file.bz2 \
20         evil_hdr-payload_overwrite.bz2 \
21         evil_hdr-stripes_payload_dmg.bz2 \
22         evil_hdr-luks_hdr_damage.bz2 \
23         evil_hdr-small_luks_device.bz2 \
24         tcrypt-images.tar.bz2 \
25         compat-test loopaes-test align-test discards-test mode-test password-hash-test \
26         verity-compat-test \
27         reencryption-compat-test \
28         tcrypt-compat-test \
29         cryptsetup-valg-supps valg.sh valg-api.sh
30
31 CLEANFILES = cryptsetup-tst* valglog*
32 clean-local:
33         -rm -rf tcrypt-images
34
35 differ_SOURCES = differ.c
36 differ_CFLAGS = $(AM_CFLAGS) -Wall -O2
37
38 api_test_SOURCES = api-test.c $(top_srcdir)/lib/utils_loop.c
39 api_test_LDADD = ../lib/libcryptsetup.la
40 api_test_LDFLAGS = $(AM_LDFLAGS) -static
41 api_test_CFLAGS = -g -Wall -O0 $(AM_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/lib/luks1
42 api_test_CPPFLAGS = $(AM_CPPFLAGS) -include config.h
43
44 check_PROGRAMS = api-test differ
45
46 compatimage.img:
47         @bzip2 -k -d compatimage.img.bz2
48
49 valgrind-check: api-test differ
50         @VALG=1 ./compat-test
51         @INFOSTRING="api-test-000" ./valg-api.sh ./api-test
52
53 .PHONY: valgrind-check