]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - usr.bin/cpio/tests/Makefile
MFH r324148:
[FreeBSD/stable/10.git] / usr.bin / cpio / tests / Makefile
1 # $FreeBSD$
2
3 SRCTOP=         ${.CURDIR:H:H:H}
4 TESTSDIR=       ${TESTSBASE}/usr.bin/cpio
5
6 LIBARCHIVEDIR=  ${SRCTOP}/contrib/libarchive
7
8 ATF_TESTS_SH+=  functional_test
9
10 BINDIR=         ${TESTSDIR}
11
12 PROGS+=         bsdcpio_test
13
14 CFLAGS+=        -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\"
15 CFLAGS+=        -I${SRCTOP}/lib/libarchive -I${.OBJDIR}
16
17 CFLAGS+=        -I${.OBJDIR}
18 CFLAGS+=        -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/cpio/test
19 CFLAGS+=        -I${LIBARCHIVEDIR}/libarchive
20 CFLAGS+=        -I${LIBARCHIVEDIR}/libarchive_fe -I${LIBARCHIVEDIR}/test_utils
21
22 # Uncomment to link against dmalloc
23 #LDADD+= -L/usr/local/lib -ldmalloc
24 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
25
26 .PATH:  ${LIBARCHIVEDIR}/cpio
27 CPIO_SRCS= cmdline.c
28
29 .PATH:  ${LIBARCHIVEDIR}/libarchive_fe
30 CPIO_SRCS+= err.c
31
32 .PATH:  ${LIBARCHIVEDIR}/cpio/test
33 TESTS_SRCS=     \
34         test_0.c                                \
35         test_basic.c                            \
36         test_cmdline.c                          \
37         test_extract_cpio_Z.c                   \
38         test_extract_cpio_bz2.c                 \
39         test_extract_cpio_grz.c                 \
40         test_extract_cpio_gz.c                  \
41         test_extract_cpio_lrz.c                 \
42         test_extract_cpio_lz.c                  \
43         test_extract_cpio_lz4.c                 \
44         test_extract_cpio_lzma.c                \
45         test_extract_cpio_lzo.c                 \
46         test_extract_cpio_xz.c                  \
47         test_extract_cpio_zstd.c                \
48         test_format_newc.c                      \
49         test_gcpio_compat.c                     \
50         test_missing_file.c                     \
51         test_option_0.c                         \
52         test_option_B_upper.c                   \
53         test_option_C_upper.c                   \
54         test_option_J_upper.c                   \
55         test_option_L_upper.c                   \
56         test_option_Z_upper.c                   \
57         test_option_a.c                         \
58         test_option_b64encode.c                 \
59         test_option_c.c                         \
60         test_option_d.c                         \
61         test_option_f.c                         \
62         test_option_grzip.c                     \
63         test_option_help.c                      \
64         test_option_l.c                         \
65         test_option_lrzip.c                     \
66         test_option_lz4.c                       \
67         test_option_lzma.c                      \
68         test_option_lzop.c                      \
69         test_option_m.c                         \
70         test_option_passphrase.c                \
71         test_option_t.c                         \
72         test_option_u.c                         \
73         test_option_uuencode.c                  \
74         test_option_version.c                   \
75         test_option_xz.c                        \
76         test_option_y.c                         \
77         test_option_z.c                         \
78         test_option_zstd.c                      \
79         test_owner_parse.c                      \
80         test_passthrough_dotdot.c               \
81         test_passthrough_reverse.c
82
83 SRCS.bsdcpio_test= list.h                       \
84         ${CPIO_SRCS}                            \
85         ${TESTS_SRCS}
86
87 .PATH:  ${LIBARCHIVEDIR}/test_utils
88 SRCS.bsdcpio_test+=     test_main.c             \
89                         test_utils.c
90
91 DPADD.bsdcpio_test=     ${LIBARCHIVE}
92 LDADD.bsdcpio_test=     -larchive
93
94 list.h: ${TESTS_SRCS} Makefile
95         @(cd ${LIBARCHIVEDIR}/tar/test && \
96         grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp
97         @mv ${.TARGET}.tmp ${.TARGET}
98
99 CLEANFILES+=    list.h list.h.tmp
100
101 FILES+= test_extract.cpio.Z.uu
102 FILES+= test_extract.cpio.bz2.uu
103 FILES+= test_extract.cpio.grz.uu
104 FILES+= test_extract.cpio.gz.uu
105 FILES+= test_extract.cpio.lrz.uu
106 FILES+= test_extract.cpio.lz.uu
107 FILES+= test_extract.cpio.lz4.uu
108 FILES+= test_extract.cpio.lzma.uu
109 FILES+= test_extract.cpio.lzo.uu
110 FILES+= test_extract.cpio.xz.uu
111 FILES+= test_extract.cpio.zst.uu
112 FILES+= test_gcpio_compat_ref.bin.uu
113 FILES+= test_gcpio_compat_ref.crc.uu
114 FILES+= test_gcpio_compat_ref.newc.uu
115 FILES+= test_gcpio_compat_ref.ustar.uu
116 FILES+= test_gcpio_compat_ref_nosym.bin.uu
117 FILES+= test_gcpio_compat_ref_nosym.crc.uu
118 FILES+= test_gcpio_compat_ref_nosym.newc.uu
119 FILES+= test_gcpio_compat_ref_nosym.ustar.uu
120 FILES+= test_option_f.cpio.uu
121 FILES+= test_option_m.cpio.uu
122 FILES+= test_option_passphrase.zip.uu
123 FILES+= test_option_t.cpio.uu
124 FILES+= test_option_t.stdout.uu
125 FILES+= test_option_tv.stdout.uu
126
127 .include <bsd.test.mk>