1# $FreeBSD$ 2 3LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 4 5ATF_TESTS_SH+= functional_test 6 7BINDIR= ${TESTSDIR} 8 9CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" 10CFLAGS+= -static 11CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} 12CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/test_utils 13 14# Uncomment to link against dmalloc 15#LDADD+= -L/usr/local/lib -ldmalloc 16#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 17 18PROGS+= bsdtar_test 19 20.PATH: ${LIBARCHIVEDIR}/tar/test 21TESTS_SRCS= \ 22 test_0.c \ 23 test_basic.c \ 24 test_copy.c \ 25 test_empty_mtree.c \ 26 test_extract_tar_bz2.c \ 27 test_extract_tar_grz.c \ 28 test_extract_tar_gz.c \ 29 test_extract_tar_lrz.c \ 30 test_extract_tar_lz.c \ 31 test_extract_tar_lzma.c \ 32 test_extract_tar_lzo.c \ 33 test_extract_tar_xz.c \ 34 test_format_newc.c \ 35 test_help.c \ 36 test_option_C_upper.c \ 37 test_option_H_upper.c \ 38 test_option_L_upper.c \ 39 test_option_O_upper.c \ 40 test_option_T_upper.c \ 41 test_option_U_upper.c \ 42 test_option_X_upper.c \ 43 test_option_a.c \ 44 test_option_b.c \ 45 test_option_b64encode.c \ 46 test_option_exclude.c \ 47 test_option_gid_gname.c \ 48 test_option_grzip.c \ 49 test_option_j.c \ 50 test_option_k.c \ 51 test_option_keep_newer_files.c \ 52 test_option_lrzip.c \ 53 test_option_lzma.c \ 54 test_option_lzop.c \ 55 test_option_n.c \ 56 test_option_newer_than.c \ 57 test_option_nodump.c \ 58 test_option_older_than.c \ 59 test_option_q.c \ 60 test_option_r.c \ 61 test_option_s.c \ 62 test_option_uid_uname.c \ 63 test_option_uuencode.c \ 64 test_option_xz.c \ 65 test_option_z.c \ 66 test_patterns.c \ 67 test_print_longpath.c \ 68 test_stdio.c \ 69 test_strip_components.c \ 70 test_symlink_dir.c \ 71 test_version.c 72 73SRCS.bsdtar_test= \ 74 ${TESTS_SRCS} \ 75 list.h \ 76 main.c 77 78DPSRCS.bsdtar_test+= list.h 79 80.PATH: ${LIBARCHIVEDIR}/test_utils 81SRCS.bsdtar_test+= test_utils.c 82 83LIBADD.bsdtar_test= archive 84 85list.h: ${TESTS_SRCS} Makefile 86 @(cd ${LIBARCHIVEDIR}/tar/test && \ 87 grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp 88 @mv ${.TARGET}.tmp ${.TARGET} 89 90CLEANFILES+= list.h list.h.tmp 91 92FILES+= test_extract.tar.Z.uu 93FILES+= test_extract.tar.bz2.uu 94FILES+= test_extract.tar.grz.uu 95FILES+= test_extract.tar.gz.uu 96FILES+= test_extract.tar.lrz.uu 97FILES+= test_extract.tar.lz.uu 98FILES+= test_extract.tar.lzma.uu 99FILES+= test_extract.tar.lzo.uu 100FILES+= test_extract.tar.xz.uu 101FILES+= test_option_keep_newer_files.tar.Z.uu 102FILES+= test_option_s.tar.Z.uu 103FILES+= test_patterns_2.tar.uu 104FILES+= test_patterns_3.tar.uu 105FILES+= test_patterns_4.tar.uu 106FILES+= test_print_longpath.tar.Z.uu 107 108.include <bsd.test.mk> 109