3 # Where to find the libarchive sources
4 LA_SRCDIR=${.CURDIR}/..
7 # Get a list of all libarchive source files
8 LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS
14 test_archive_api_feature.c \
17 test_compat_tar_hardlink.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 \
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 \
49 test_read_pax_truncated.c \
50 test_read_position.c \
51 test_read_truncated.c \
52 test_tar_filenames.c \
54 test_ustar_filenames.c \
55 test_write_compress.c \
56 test_write_compress_program.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
74 # Build the test program using all libarchive sources + the test sources.
84 INTERNALPROG=yes # Don't install this; it's just for testing
85 DPADD=${LIBBZ2} ${LIBZ}
86 CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
89 CFLAGS+= -I${LA_SRCDIR} -I.
91 # Uncomment to link against dmalloc
92 #LDADD+= -L/usr/local/lib -ldmalloc
93 #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
96 # Build libarchive_test and run it.
97 check test: libarchive_test
98 ./libarchive_test -v -r ${.CURDIR}
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
104 CLEANFILES += *.out *.o *.core *~ list.h
107 -chmod -R +w /tmp/libarchive_test.*
108 rm -rf /tmp/libarchive_test.*
110 .include <bsd.prog.mk>