1# $FreeBSD$ 2 3.include <bsd.compiler.mk> 4 5PACKAGE= tests 6 7TESTSDIR= ${TESTSBASE}/sys/fs/fusefs 8 9# We could simply link all of these files into a single executable. But since 10# Kyua treats googletest programs as plain tests, it's better to separate them 11# out, so we get more granular reporting. 12GTESTS+= access 13GTESTS+= allow_other 14GTESTS+= bad_server 15GTESTS+= bmap 16GTESTS+= cache 17GTESTS+= copy_file_range 18GTESTS+= create 19GTESTS+= default_permissions 20GTESTS+= default_permissions_privileged 21GTESTS+= destroy 22GTESTS+= dev_fuse_poll 23GTESTS+= fallocate 24GTESTS+= fifo 25GTESTS+= flush 26GTESTS+= forget 27GTESTS+= fsync 28GTESTS+= fsyncdir 29GTESTS+= getattr 30GTESTS+= interrupt 31GTESTS+= io 32GTESTS+= last_local_modify 33GTESTS+= link 34GTESTS+= locks 35GTESTS+= lookup 36GTESTS+= lseek 37GTESTS+= mkdir 38GTESTS+= mknod 39GTESTS+= mount 40GTESTS+= nfs 41GTESTS+= notify 42GTESTS+= open 43GTESTS+= opendir 44GTESTS+= read 45GTESTS+= readdir 46GTESTS+= readlink 47GTESTS+= release 48GTESTS+= releasedir 49GTESTS+= rename 50GTESTS+= rmdir 51GTESTS+= setattr 52GTESTS+= statfs 53GTESTS+= symlink 54GTESTS+= unlink 55GTESTS+= write 56GTESTS+= xattr 57 58.for p in ${GTESTS} 59SRCS.$p+= ${p}.cc 60SRCS.$p+= getmntopts.c 61SRCS.$p+= mockfs.cc 62SRCS.$p+= utils.cc 63.endfor 64 65TEST_METADATA.default_permissions+= required_user="unprivileged" 66TEST_METADATA.default_permissions_privileged+= required_user="root" 67TEST_METADATA.mknod+= required_user="root" 68TEST_METADATA.nfs+= required_user="root" 69 70# TODO: drastically increase timeout after test development is mostly complete 71TEST_METADATA+= timeout=10 72 73FUSEFS= ${SRCTOP}/sys/fs/fuse 74MOUNT= ${SRCTOP}/sbin/mount 75# Suppress warnings that GCC generates for the libc++ and gtest headers. 76CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes 77# Suppress Wcast-align for readdir.cc, because it is unavoidable when using 78# getdirentries. 79CXXWARNFLAGS.readdir.cc+= -Wno-cast-align 80.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000 81CXXWARNFLAGS+= -Wno-class-memaccess 82.endif 83# Supress warnings about deprecated implicit copy constructors in gtest. 84CXXWARNFLAGS+= -Wno-deprecated-copy 85CXXFLAGS+= -I${SRCTOP}/tests 86CXXFLAGS+= -I${FUSEFS} 87CXXFLAGS+= -I${MOUNT} 88.PATH: ${MOUNT} 89CXXSTD= c++14 90 91LIBADD+= pthread 92LIBADD+= gmock gtest 93LIBADD+= util 94 95.include <bsd.test.mk> 96