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 68# TODO: drastically increase timeout after test development is mostly complete 69TEST_METADATA+= timeout=10 70 71FUSEFS= ${SRCTOP}/sys/fs/fuse 72MOUNT= ${SRCTOP}/sbin/mount 73# Suppress warnings that GCC generates for the libc++ and gtest headers. 74CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes 75# Suppress Wcast-align for readdir.cc, because it is unavoidable when using 76# getdirentries. 77CXXWARNFLAGS.readdir.cc+= -Wno-cast-align 78.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000 79CXXWARNFLAGS+= -Wno-class-memaccess 80.endif 81# Suppress false warning about set but unused DNAME in inval_entry_below_root 82CXXWARNFLAGS.gcc+= -Wno-unused-but-set-variable 83# Suppress warnings about deprecated implicit copy constructors in gtest. 84CXXWARNFLAGS+= -Wno-deprecated-copy 85.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 180000 86# clang 18.0.0 introduces a new warning about variable length arrays in C++. 87CXXWARNFLAGS+= -Wno-vla-cxx-extension 88.endif 89CXXFLAGS+= -I${SRCTOP}/tests 90CXXFLAGS+= -I${FUSEFS} 91CXXFLAGS+= -I${MOUNT} 92.PATH: ${MOUNT} 93CXXSTD= c++14 94 95LIBADD+= pthread 96LIBADD+= gmock gtest 97LIBADD+= util 98 99.include <bsd.test.mk> 100