1# $OpenBSD: Makefile,v 1.34 2025/01/23 11:19:12 mpi 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 beginend-argn boolean comments \ 8 delete exit histempty if \ 9 map mapclear mapempty mapsyntax mapzero map-unnamed \ 10 maxoperand min+max+sum multiend multismts nsecs+var \ 11 precedence print printf read-map-after-clear \ 12 staticv-empty syntaxerror tuple tupleeval vareval 13 14BT_ARG_LANG_SCRIPTS= staticv str 15 16# scripts that use kernel probes 17BT_KERN_SCRIPTS= argn empty-stmts filters interval mapoverwrite \ 18 multiprobe 19 20REGRESS_EXPECTED_FAILURES= run-maxoperand 21 22.for b in ${BT_LANG_SCRIPTS} 23REGRESS_TARGETS+= run-$b 24run-$b: 25 cd ${.CURDIR} && ${BTRACE} $b.bt 2>&1 | diff -u $b.ok /dev/stdin 26.endfor 27 28.for b in ${BT_ARG_LANG_SCRIPTS} 29REGRESS_TARGETS+= run-$b 30run-$b: 31 cat ${.CURDIR}/$b.args | xargs ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \ 32 diff -u ${.CURDIR}/$b.ok /dev/stdin 33.endfor 34 35.for b in ${BT_KERN_SCRIPTS} 36REGRESS_TARGETS+= run-$b 37REGRESS_ROOT_TARGETS+= run-$b 38run-$b: 39.if ${ALLOWDT} 40 ${SUDO} ${BTRACE} ${.CURDIR}/$b.bt 2>&1 | \ 41 diff -u ${.CURDIR}/$b.ok /dev/stdin 42.else 43 @echo 'Set "sysctl kern.allowdt=1" to enable $@ tests' 44 @echo SKIPPED 45.endif 46.endfor 47 48.include <bsd.regress.mk> 49