xref: /freebsd/tests/sys/fs/fusefs/Makefile (revision cab6a39d7b343596a5823e65c0f7b426551ec22d)
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
80# Supress warnings about deprecated implicit copy constructors in gtest.
81CXXWARNFLAGS+=  -Wno-deprecated-copy
82CXXFLAGS+=	-I${SRCTOP}/tests
83CXXFLAGS+=	-I${FUSEFS}
84CXXFLAGS+=	-I${MOUNT}
85.PATH:		${MOUNT}
86CXXSTD=		c++14
87
88LIBADD+=	pthread
89LIBADD+=	gmock gtest
90LIBADD+=	util
91
92.include <bsd.test.mk>
93