xref: /freebsd/tests/sys/fs/fusefs/Makefile (revision 734e82fe33aa764367791a7d603b383996c6b40b)
1
2.include <bsd.compiler.mk>
3
4PACKAGE=	tests
5
6TESTSDIR=	${TESTSBASE}/sys/fs/fusefs
7
8# We could simply link all of these files into a single executable.  But since
9# Kyua treats googletest programs as plain tests, it's better to separate them
10# out, so we get more granular reporting.
11GTESTS+=	access
12GTESTS+=	allow_other
13GTESTS+=	bad_server
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# Suppress false warning about set but unused DNAME in inval_entry_below_root
83CXXWARNFLAGS.gcc+= -Wno-unused-but-set-variable
84# Suppress warnings about deprecated implicit copy constructors in gtest.
85CXXWARNFLAGS+=  -Wno-deprecated-copy
86CXXFLAGS+=	-I${SRCTOP}/tests
87CXXFLAGS+=	-I${FUSEFS}
88CXXFLAGS+=	-I${MOUNT}
89.PATH:		${MOUNT}
90CXXSTD=		c++14
91
92LIBADD+=	pthread
93LIBADD+=	gmock gtest
94LIBADD+=	util
95
96.include <bsd.test.mk>
97