summaryrefslogtreecommitdiff
path: root/regress/sys/kern/execve/Makefile
blob: ad216bf3390b2e0c6c55d7600e3ec40366feb8cd (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#	$OpenBSD: Makefile,v 1.4 2002/01/01 23:05:30 art Exp $

PROG=	doexec
LDSTATIC= -static

RP=	${.OBJDIR}/${PROG}
TD=	${.CURDIR}/tests
OD=	${.CURDIR}/good

TESTFILES= empty nonexistshell devnullscript badinterplen goodscript \
	   scriptarg scriptarg-nospace goodaout truncaout

CLEANFILES+= ${TESTFILES}

all:	${PROG} ${TESTFILES}

REGRESSTARGETS=	test-empty test-nonexist \
		test-nonexistshell test-devnullscript test-badinterplen \
		test-goodscript test-scriptarg test-scriptarg-nospace \
		test-goodaout test-truncaout

empty: ${TD}/empty.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-empty:	${PROG} empty
	${RP} ${.OBJDIR}/empty | diff - ${OD}/empty

nonexist: ${TD}/nonexist.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-nonexist:	${PROG}
	${RP} ${.OBJDIR}/nonexistent | diff - ${OD}/nonexistent

nonexistshell: ${TD}/nonexistshell.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-nonexistshell: ${PROG} nonexistshell
	${RP} ${.OBJDIR}/nonexistshell | diff - ${OD}/nonexistshell

devnullscript: ${TD}/devnullscript.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-devnullscript: ${PROG} devnullscript
	${RP} ${.OBJDIR}/devnullscript | diff - ${OD}/devnullscript

badinterplen: ${TD}/badinterplen.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-badinterplen: ${PROG} badinterplen
	${RP} ${.OBJDIR}/badinterplen | diff - ${OD}/badinterplen

goodscript: ${TD}/goodscript.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-goodscript: ${PROG} goodscript
	${RP} ${.OBJDIR}/goodscript | diff - ${OD}/goodscript

scriptarg: ${TD}/scriptarg.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-scriptarg: ${PROG} scriptarg
	${RP} ${.OBJDIR}/scriptarg 2>&1 | diff - ${OD}/scriptarg

scriptarg-nospace: ${TD}/scriptarg-nospace.in
	${INSTALL} -c -m 755 ${.ALLSRC} ${.TARGET}

test-scriptarg-nospace: ${PROG} scriptarg-nospace
	${RP} ${.OBJDIR}/scriptarg-nospace 2>&1 | diff - ${OD}/scriptarg-nospace

goodaout: ${TD}/goodaout.c
	${LINK.c} ${LDSTATIC} -o ${.TARGET} ${TD}/goodaout.c ${LDLIBS}

test-goodaout: ${PROG} goodaout
	${RP} ${.OBJDIR}/goodaout | diff - ${OD}/goodaout

truncaout: goodaout
	/bin/rm -rf truncaout
	dd if=${.OBJDIR}/goodaout of=truncaout bs=16 count=1
	chmod a+x truncaout

test-truncaout: ${PROG} truncaout
	${RP} ${.OBJDIR}/truncaout | diff - ${OD}/truncaout

.include <bsd.regress.mk>