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