summaryrefslogtreecommitdiff
path: root/regress/sys/dev/wscons/Makefile
blob: 8226a56ac2fd40a0e8c10160a24113eb763aad82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# $OpenBSD: Makefile,v 1.10 2020/12/16 22:59:55 bluhm Exp $

WARNINGS=	yes

.if ! (make(clean) || make(cleandir) || make(obj))
DEVICES=	wskbd0 wsmouse0 wskbd
.for d in ${DEVICES}
HAVE_${d} ?!= if dd if=/dev/${d} count=0 status=none; \
    then echo yes; else echo no; fi
MAKE := HAVE_${d}="${HAVE_${d}}" ${MAKE}
.endfor
.endif

PROG_sigio=	sigio
PROGS+=		${PROG_sigio}
SRCS_sigio=	sigio.c util.c

TESTS_sigio+=	getown-fcntl
TESTS_sigio+=	getown-ioctl
TESTS_sigio+=	gpgrp
TESTS_sigio+=	setown-fcntl
TESTS_sigio+=	setown-ioctl
TESTS_sigio+=	spgrp
TESTS_sigio+=	sigio

# SIGIO using event injection is limited to wsmux devices.
IGNORE_sigio+=	wskbd0-sigio
IGNORE_sigio+=	wsmouse0-sigio

.for d in ${DEVICES}
.  for t in ${TESTS_sigio}
.    if empty(IGNORE_sigio:M$d-$t)
REGRESS_TARGETS+=	run-${PROG_sigio}-$d-$t
run-${PROG_sigio}-$d-$t: ${PROG_sigio}
.      if ${HAVE_${d}:L} == "yes"
	./${PROG_sigio} -d /dev/$d $t
.      else
	# no access to device ${d} on this machine
	@echo SKIPPED
.      endif
.    endif
.  endfor
.endfor

PROG_wscons=	wscons
PROGS+=		${PROG_wscons}
SRCS_wscons=	wscons.c util.c

TESTS_wscons+=	ioctl-unknown

.for d in ${DEVICES}
.  for t in ${TESTS_wscons}
REGRESS_TARGETS+=	run-${PROG_wscons}-$d-$t
run-${PROG_wscons}-$d-$t: ${PROG_wscons}
.    if ${HAVE_${d}:L} == "yes"
	./${PROG_wscons} -d /dev/$d $t
.    else
	# device ${d} does not exists on this machine
	@echo SKIPPED
.    endif
.  endfor
.endfor

.include <bsd.regress.mk>