summaryrefslogtreecommitdiff
path: root/usr.bin/unzip/tests/Makefile
blob: fada172b1bd7fd96edc6836b3a1b733ed81591ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
PACKAGE=	tests

_LIBARCHIVEDIR=	${SRCTOP}/contrib/libarchive

ATF_TESTS_SH+=	functional_test

BINDIR=		${TESTSDIR}

PROGS+=		bsdunzip_test

CFLAGS+=	-DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\"
CFLAGS+=	-I${SRCTOP}/lib/libarchive -I${.OBJDIR}

CFLAGS+=	-I${.OBJDIR}
CFLAGS+=	-I${_LIBARCHIVEDIR}/unzip -I${_LIBARCHIVEDIR}/unzip/test
CFLAGS+=	-I${_LIBARCHIVEDIR}/libarchive
CFLAGS+=	-I${_LIBARCHIVEDIR}/libarchive_fe -I${_LIBARCHIVEDIR}/test_utils

# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC

CFLAGS.test_utils.c+=	-Wno-cast-align

.PATH:	${_LIBARCHIVEDIR}/libarchive_fe
UNZIP_SRCS+= lafe_err.c

.PATH:	${_LIBARCHIVEDIR}/unzip/test
TESTS_SRCS=	\
	test_0.c 				\
	test_C.c				\
	test_I.c				\
	test_L.c				\
	test_P_encryption.c			\
	test_Z1.c				\
	test_basic.c				\
	test_d.c				\
	test_doubledash.c			\
	test_glob.c				\
	test_j.c				\
	test_n.c				\
	test_not_exist.c			\
	test_o.c				\
	test_p.c				\
	test_q.c				\
	test_singlefile.c 			\
	test_t.c				\
	test_t_bad.c				\
	test_version.c				\
	test_x.c

SRCS.bsdunzip_test= list.h			\
	${UNZIP_SRCS}				\
	${TESTS_SRCS}

.PATH:	${_LIBARCHIVEDIR}/test_utils
SRCS.bsdunzip_test+=	test_main.c		\
			test_utils.c

LIBADD.bsdunzip_test=	archive

list.h: ${TESTS_SRCS} Makefile
	@(cd ${_LIBARCHIVEDIR}/unzip/test && \
	grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp
	@mv ${.TARGET}.tmp ${.TARGET}

CLEANFILES+=	list.h list.h.tmp

${PACKAGE}FILES+= test_I.zip.uu
${PACKAGE}FILES+= test_basic.zip.uu
${PACKAGE}FILES+= test_encrypted.zip.uu
${PACKAGE}FILES+= test_singlefile.zip.uu
${PACKAGE}FILES+= test_t_bad.zip.uu

.include <bsd.test.mk>