Makefile.am 2.55 KB
Newer Older
Milan Broz's avatar
Milan Broz committed
1
TESTS = api-test \
Milan Broz's avatar
Milan Broz committed
2
	api-test-2 \
Milan Broz's avatar
Milan Broz committed
3
	compat-test \
Milan Broz's avatar
Milan Broz committed
4
	compat-test2 \
Milan Broz's avatar
Milan Broz committed
5 6 7 8 9
	loopaes-test \
	align-test \
	discards-test \
	mode-test \
	password-hash-test \
10
	tcrypt-compat-test \
11
	luks1-compat-test \
12
	device-test \
Milan Broz's avatar
Milan Broz committed
13 14 15
	keyring-test \
	luks2-validation-test \
	luks2-integrity-test
16 17 18 19

if VERITYSETUP
TESTS += verity-compat-test
endif
20

Milan Broz's avatar
Milan Broz committed
21
if REENCRYPT
22 23
TESTS += reencryption-compat-test reencryption-compat-test2

Milan Broz's avatar
Milan Broz committed
24 25
endif

26 27 28 29
if INTEGRITYSETUP
TESTS += integrity-compat-test
endif

Milan Broz's avatar
Milan Broz committed
30
EXTRA_DIST = compatimage.img.bz2 compatv10image.img.bz2 \
Milan Broz's avatar
Milan Broz committed
31 32 33
	compatimage2.img.xz \
	conversion_imgs.tar.xz \
	luks2_keyslot_unassigned.img.xz \
Ondrej Kozina's avatar
Ondrej Kozina committed
34
	img_fs_ext4.img.bz2 img_fs_vfat.img.bz2 img_fs_xfs.img.bz2 \
35
	valid_header_file.bz2 \
Milan Broz's avatar
Milan Broz committed
36 37 38
	luks2_valid_hdr.img.xz \
	luks2_header_requirements.xz \
	luks2_header_requirements_free.xz \
39 40 41 42
	evil_hdr-payload_overwrite.bz2 \
	evil_hdr-stripes_payload_dmg.bz2 \
	evil_hdr-luks_hdr_damage.bz2 \
	evil_hdr-small_luks_device.bz2 \
43
	evil_hdr-keyslot_overlap.bz2 \
44
	tcrypt-images.tar.bz2 \
45
	luks1-images.tar.bz2 \
Milan Broz's avatar
Milan Broz committed
46 47 48
	compat-test \
	compat-test2 \
	loopaes-test align-test discards-test mode-test password-hash-test \
Milan Broz's avatar
Milan Broz committed
49
	verity-compat-test \
Milan Broz's avatar
Milan Broz committed
50
	reencryption-compat-test \
51
	reencryption-compat-test2 \
Milan Broz's avatar
Milan Broz committed
52
	tcrypt-compat-test \
53
	luks1-compat-test \
Milan Broz's avatar
Milan Broz committed
54 55
	luks2-validation-test generators \
	luks2-integrity-test \
56
	device-test \
57
	keyring-test \
58
	integrity-compat-test \
59
	cryptsetup-valg-supps valg.sh valg-api.sh
60

61
CLEANFILES = cryptsetup-tst* valglog*
62
clean-local:
Milan Broz's avatar
Milan Broz committed
63
	-rm -rf tcrypt-images luks1-images luks2-images conversion_imgs luks2_valid_hdr.img
64

65
differ_SOURCES = differ.c
66
differ_CFLAGS = $(AM_CFLAGS) -Wall -O2
67

68
api_test_SOURCES = api-test.c api_test.h test_utils.c
Milan Broz's avatar
Milan Broz committed
69
api_test_LDADD = ../libcryptsetup.la
70 71 72
api_test_LDFLAGS = $(AM_LDFLAGS) -static
api_test_CFLAGS = -g -Wall -O0 $(AM_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/lib/luks1
api_test_CPPFLAGS = $(AM_CPPFLAGS) -include config.h
73

74
api_test_2_SOURCES = api-test-2.c api_test.h test_utils.c
Milan Broz's avatar
Milan Broz committed
75
api_test_2_LDADD = ../libcryptsetup.la
Milan Broz's avatar
Milan Broz committed
76 77 78 79 80 81 82 83
api_test_2_LDFLAGS = $(AM_LDFLAGS) -static
api_test_2_CFLAGS = -g -Wall -O0 $(AM_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/lib/luks1
api_test_2_CPPFLAGS = $(AM_CPPFLAGS) -include config.h

check_PROGRAMS = api-test api-test-2 differ

conversion_imgs:
	@tar xJf conversion_imgs.tar.xz
84 85 86

compatimage.img:
	@bzip2 -k -d compatimage.img.bz2
87

Milan Broz's avatar
Milan Broz committed
88
valgrind-check: api-test api-test-2 differ
89
	@VALG=1 ./compat-test
Milan Broz's avatar
Milan Broz committed
90 91
	@VALG=1 ./compat-test2
	@VALG=1 ./luks2-validation-test
Milan Broz's avatar
Milan Broz committed
92 93
	@VALG=1 ./verity-compat-test
	@VALG=1 ./integrity-compat-test
94
	@INFOSTRING="api-test-000" ./valg-api.sh ./api-test
Milan Broz's avatar
Milan Broz committed
95
	@INFOSTRING="api-test-002" ./valg-api.sh ./api-test-2
96 97

.PHONY: valgrind-check