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