Makefile revision 159097
1159097Smaxim# $FreeBSD: head/tools/regression/execve/Makefile 159097 2006-05-31 11:13:10Z maxim $ 2159097Smaxim 3159097SmaximPROG= doexec 4159097SmaximNO_MAN= 5159097Smaxim 6159097SmaximRP= ./${PROG} 7159097SmaximTD= ${.CURDIR}/tests 8159097SmaximOD= ${.CURDIR}/good 9159097Smaxim 10159097SmaximTESTSCRIPTS= nonexistshell devnullscript badinterplen goodscript \ 11159097Smaxim scriptarg scriptarg-nospace 12159097SmaximCLEANFILES= goodaout truncaout sparceaout empty ${TESTSCRIPTS} 13159097Smaxim 14159097Smaximall: ${PROG} goodaout ${TESTSCRIPTS} 15159097Smaxim 16159097Smaxim.for x in ${TESTSCRIPTS} 17159097Smaxim${x}: ${TD}/${x} 18159097Smaxim cp ${TD}/${x} . 19159097Smaxim chmod +x ${x} 20159097Smaxim.endfor 21159097Smaxim 22159097Smaximregress: test-empty test-nonexist test-nonexistshell \ 23159097Smaxim test-devnullscript test-badinterplen test-goodscript \ 24159097Smaxim test-scriptarg test-scriptarg-nospace test-goodaout \ 25159097Smaxim test-truncaout test-sparceaout 26159097Smaxim 27159097Smaximtest-empty: ${PROG} 28159097Smaxim rm -f empty 29159097Smaxim touch empty 30159097Smaxim chmod +x empty 31159097Smaxim ${RP} empty | diff ${OD}/empty - 32159097Smaxim 33159097Smaximtest-nonexist: ${PROG} 34159097Smaxim ${RP} ${TD}/nonexistent | grep 'No such file or directory' 35159097Smaxim 36159097Smaximtest-nonexistshell: ${PROG} nonexistshell 37159097Smaxim ${RP} nonexistshell | grep 'No such file or directory' 38159097Smaxim 39159097Smaximtest-devnullscript: ${PROG} devnullscript 40159097Smaxim ${RP} devnullscript | grep 'Permission denied' 41159097Smaxim 42159097Smaximtest-badinterplen: ${PROG} badinterplen 43159097Smaxim ${RP} badinterplen | grep 'No such file or directory' 44159097Smaxim 45159097Smaximtest-goodscript: ${PROG} goodscript 46159097Smaxim ${RP} goodscript | grep 'succeeded' 47159097Smaxim 48159097Smaximtest-scriptarg: ${PROG} scriptarg 49159097Smaxim ${RP} scriptarg 2>&1 | grep '+ echo succeeded' 50159097Smaxim 51159097Smaximtest-scriptarg-nospace: ${PROG} scriptarg-nospace 52159097Smaxim ${RP} scriptarg-nospace 2>&1 | grep '+ echo succeeded' 53159097Smaxim 54159097Smaximgoodaout: ${TD}/goodaout.c 55159097Smaxim ${CC} -static -o ${.TARGET} ${TD}/goodaout.c 56159097Smaxim 57159097Smaximtest-goodaout: ${PROG} goodaout 58159097Smaxim ${RP} goodaout | grep 'succeeded' 59159097Smaxim 60159097Smaximtest-truncaout: ${PROG} goodaout 61159097Smaxim truncate -s 16 truncaout 62159097Smaxim chmod a+x truncaout 63159097Smaxim ${RP} truncaout | grep 'Exec format error' 64159097Smaxim 65159097Smaximtest-sparceaout: ${PROG} 66159097Smaxim /bin/rm -rf sparceaout 67159097Smaxim truncate -s 20480 sparceaout 68159097Smaxim chmod a+x sparceaout 69159097Smaxim ${RP} sparceaout | grep 'Exec format error' 70159097Smaxim 71159097Smaxim.include <bsd.prog.mk> 72