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