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+= bmap 15GTESTS+= create 16GTESTS+= default_permissions 17GTESTS+= default_permissions_privileged 18GTESTS+= destroy 19GTESTS+= dev_fuse_poll 20GTESTS+= fifo 21GTESTS+= flush 22GTESTS+= forget 23GTESTS+= fsync 24GTESTS+= fsyncdir 25GTESTS+= getattr 26GTESTS+= interrupt 27GTESTS+= io 28GTESTS+= link 29GTESTS+= locks 30GTESTS+= lookup 31GTESTS+= mkdir 32GTESTS+= mknod 33GTESTS+= mount 34GTESTS+= nfs 35GTESTS+= notify 36GTESTS+= open 37GTESTS+= opendir 38GTESTS+= read 39GTESTS+= readdir 40GTESTS+= readlink 41GTESTS+= release 42GTESTS+= releasedir 43GTESTS+= rename 44GTESTS+= rmdir 45GTESTS+= setattr 46GTESTS+= statfs 47GTESTS+= symlink 48GTESTS+= unlink 49GTESTS+= write 50GTESTS+= xattr 51 52.for p in ${GTESTS} 53SRCS.$p+= ${p}.cc 54SRCS.$p+= getmntopts.c 55SRCS.$p+= mockfs.cc 56SRCS.$p+= utils.cc 57.endfor 58 59TEST_METADATA.default_permissions+= required_user="unprivileged" 60TEST_METADATA.default_permissions_privileged+= required_user="root" 61TEST_METADATA.mknod+= required_user="root" 62TEST_METADATA.nfs+= required_user="root" 63 64# TODO: drastically increase timeout after test development is mostly complete 65TEST_METADATA+= timeout=10 66 67FUSEFS= ${SRCTOP}/sys/fs/fuse 68MOUNT= ${SRCTOP}/sbin/mount 69# Suppress warnings that GCC generates for the libc++ and gtest headers. 70CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes 71.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000 72CXXWARNFLAGS+= -Wno-class-memaccess 73.endif 74CXXFLAGS+= -I${SRCTOP}/tests 75CXXFLAGS+= -I${FUSEFS} 76CXXFLAGS+= -I${MOUNT} 77.PATH: ${MOUNT} 78CXXSTD= c++14 79 80LIBADD+= pthread 81LIBADD+= gmock gtest 82LIBADD+= util 83 84WARNS?= 6 85 86.include <bsd.test.mk> 87