1# $OpenBSD: Makefile,v 1.25 2021/12/19 01:07:50 guenther Exp $ 2 3BTRACE?= /usr/sbin/btrace 4ALLOWDT!= sysctl -n kern.allowdt 2>/dev/null 5 6# scripts that don't need /dev/dt 7BT_LANG_SCRIPTS= arithm beginend boolean comments delete exit \ 8 histempty if \ 9 map mapclear mapempty mapsyntax mapzero map-unnamed \ 10 maxoperand min+max+sum multismts nsecs+var \ 11 precedence print read-map-after-clear staticv-empty \ 12 syntaxerror 13 14BT_ARG_LANG_SCRIPTS= staticv str 15 16# scripts that use kernel probes 17BT_KERN_SCRIPTS= multiprobe 18 19REGRESS_EXPECTED_FAILURES= run-maxoperand 20 21.for b in ${BT_LANG_SCRIPTS} 22REGRESS_TARGETS+= run-$b 23run-$b: 24 cd ${.CURDIR} && ${BTRACE} $b.bt 2>&1 | diff -u $b.ok /dev/stdin 25.endfor 26 27.for b in ${BT_ARG_LANG_SCRIPTS} 28REGRESS_TARGETS+= run-$b 29run-$b: 30 cat ${.CURDIR}/$b.args | xargs ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \ 31 diff -u ${.CURDIR}/$b.ok /dev/stdin 32.endfor 33 34.for b in ${BT_KERN_SCRIPTS} 35REGRESS_TARGETS+= run-$b 36REGRESS_ROOT_TARGETS+= run-$b 37run-$b: 38.if ${ALLOWDT} 39 ${SUDO} ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \ 40 diff -u ${.CURDIR}/$b.ok /dev/stdin 41.else 42 @echo 'Set "sysctl kern.allowdt=1" to enable $@ tests' 43 @echo SKIPPED 44.endif 45.endfor 46 47.include <bsd.regress.mk> 48