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