xref: /freebsd/tests/sys/fs/fusefs/Makefile (revision 79ac3c12a714bcd3f2354c52d948aed9575c46d6)
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# 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
80CXXFLAGS+=	-I${SRCTOP}/tests
81CXXFLAGS+=	-I${FUSEFS}
82CXXFLAGS+=	-I${MOUNT}
83.PATH:		${MOUNT}
84CXXSTD=		c++14
85
86LIBADD+=	pthread
87LIBADD+=	gmock gtest
88LIBADD+=	util
89
90.include <bsd.test.mk>
91