]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - lib/libarchive/test/Makefile
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / lib / libarchive / test / Makefile
1 # $FreeBSD$
2
3 # Where to find the libarchive sources
4 LA_SRCDIR=${.CURDIR}/..
5 .PATH: ${LA_SRCDIR}
6
7 # Get a list of all libarchive source files
8 LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS
9
10 TESTS= \
11         test_acl_basic.c                        \
12         test_acl_freebsd.c                      \
13         test_acl_pax.c                          \
14         test_archive_api_feature.c              \
15         test_bad_fd.c                           \
16         test_compat_gtar.c                      \
17         test_compat_tar_hardlink.c              \
18         test_compat_zip.c                       \
19         test_empty_write.c                      \
20         test_entry.c                            \
21         test_entry_strmode.c                    \
22         test_link_resolver.c                    \
23         test_pax_filename_encoding.c            \
24         test_read_compress_program.c            \
25         test_read_data_large.c                  \
26         test_read_extract.c                     \
27         test_read_format_ar.c                   \
28         test_read_format_cpio_bin.c             \
29         test_read_format_cpio_bin_Z.c           \
30         test_read_format_cpio_bin_bz2.c         \
31         test_read_format_cpio_bin_gz.c          \
32         test_read_format_cpio_odc.c             \
33         test_read_format_cpio_svr4_gzip.c       \
34         test_read_format_cpio_svr4c_Z.c         \
35         test_read_format_empty.c                \
36         test_read_format_gtar_gz.c              \
37         test_read_format_gtar_sparse.c          \
38         test_read_format_iso_gz.c               \
39         test_read_format_isorr_bz2.c            \
40         test_read_format_mtree.c                \
41         test_read_format_pax_bz2.c              \
42         test_read_format_tar.c                  \
43         test_read_format_tar_empty_filename.c   \
44         test_read_format_tbz.c                  \
45         test_read_format_tgz.c                  \
46         test_read_format_tz.c                   \
47         test_read_format_zip.c                  \
48         test_read_large.c                       \
49         test_read_pax_truncated.c               \
50         test_read_position.c                    \
51         test_read_truncated.c                   \
52         test_tar_filenames.c                    \
53         test_tar_large.c                        \
54         test_ustar_filenames.c                  \
55         test_write_compress.c                   \
56         test_write_compress_program.c           \
57         test_write_disk.c                       \
58         test_write_disk_hardlink.c              \
59         test_write_disk_perms.c                 \
60         test_write_disk_secure.c                \
61         test_write_disk_sparse.c                \
62         test_write_format_ar.c                  \
63         test_write_format_cpio.c                \
64         test_write_format_cpio_empty.c          \
65         test_write_format_cpio_newc.c           \
66         test_write_format_cpio_odc.c            \
67         test_write_format_shar_empty.c          \
68         test_write_format_tar.c                 \
69         test_write_format_tar_empty.c           \
70         test_write_format_tar_ustar.c           \
71         test_write_open_memory.c
72
73
74 # Build the test program using all libarchive sources + the test sources.
75 SRCS= ${LA_SRCS}                                \
76         ${TESTS}                                \
77         list.h                                  \
78         main.c                                  \
79         read_open_memory.c
80
81 NO_MAN=yes
82
83 PROG=libarchive_test
84 INTERNALPROG=yes  # Don't install this; it's just for testing
85 DPADD=${LIBBZ2} ${LIBZ}
86 CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
87 LDADD= -lz -lbz2
88 CFLAGS+= -static -g
89 CFLAGS+= -I${LA_SRCDIR} -I.
90
91 # Uncomment to link against dmalloc
92 #LDADD+= -L/usr/local/lib -ldmalloc
93 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
94 #WARNS=6
95
96 # Build libarchive_test and run it.
97 check test: libarchive_test
98         ./libarchive_test -v -r ${.CURDIR}
99
100 # list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines
101 list.h: ${TESTS} Makefile
102         (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
103
104 CLEANFILES += *.out *.o *.core *~ list.h
105
106 cleantest:
107         -chmod -R +w /tmp/libarchive_test.*
108         rm -rf /tmp/libarchive_test.*
109
110 .include <bsd.prog.mk>