]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/regression/filemon/Makefile
Upgrade our copy of llvm/clang to r168974, from upstream's release_32
[FreeBSD/FreeBSD.git] / tools / regression / filemon / Makefile
1 # $FreeBSD$
2
3 BINS=   \
4         filemontest \
5         timed-forkb
6
7 bins: filemontest timed-forkb
8 all: bins
9
10 NO_MAN=
11
12 WARNS?= 6
13 CFLAGS+= -I${.CURDIR}/../../../sys
14
15 # Should be "WITHOUT_CTF=" below, but stupid infastrurture fails:
16 # "/usr/share/mk/bsd.own.mk", line 489: WITH_CTF and WITHOUT_CTF can't both be set.
17 WITHOUT_CDDL=
18
19 CLEANFILES+=    ${BINS}
20
21 tests: bins
22         kldstat | grep filemon
23         ${MAKE} test
24         @echo "Without filemon(4) active:"
25         ./timed-forkb
26         @echo "With filemon(4) active:"
27         script -f typescript-timed-forkb ./timed-forkb
28         ls -l typescript-timed-forkb.filemon
29         @echo "filemon(4) tests passed."
30
31 # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in .
32 #FILEMONTEST32= filemontest32
33 test: filemontest clean-test
34 .for BIN in filemontest ${FILEMONTEST32}
35         cd ${.CURDIR} ; \
36                 for A in 1 2 3 4 5 6 7 8 9 0; do \
37                 for B in 1 2 3 4 5 6 7 8 9 0; do \
38                 for C in 1 2 3 4 5 6 7 8 9 0; do \
39                         test -x ${BIN} && ${.OBJDIR}/${BIN} ;\
40                 done ;\
41                 done ;\
42                 done
43         @cd ${.CURDIR} ; set +e ; egrep '(Start|Stop) .*\.' filemon_log.* | \
44             grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || echo "Time stamp format OK"
45 .endfor
46
47 CLEANFILES+=    typescript-timed-forkb typescript-timed-forkb.filemon
48
49 clean-test:
50         cd ${.CURDIR} ; rm -f filemon_log.*
51
52 clean-tests: clean-test
53
54 .include <bsd.prog.mk>