diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-02-18 13:08:52 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-02-18 13:08:52 +0000 |
commit | dd8248c607b9c27f00cb51c1ae55e8ee5210089f (patch) | |
tree | 64bad3b6f58b17bdc8e5a4459714d9e00c52ffdb | |
parent | 72269bea84b524234ff2a13532dff07fee6b8f14 (diff) |
Clean up.
- Don't print failure and return succes, shut up and fail properly.
- Don't generate reults once and rerun compares later. Rerun every time.
- Don't generate any files, pipes are there to be used.
-rw-r--r-- | regress/sbin/pfctl/Makefile | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile index 3b8a629ea24..b244e19b3d5 100644 --- a/regress/sbin/pfctl/Makefile +++ b/regress/sbin/pfctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2002/01/01 23:05:30 art Exp $ +# $OpenBSD: Makefile,v 1.13 2002/02/18 13:08:51 art Exp $ PFTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 PFFAIL=1 2 3 4 5 6 7 8 @@ -7,34 +7,27 @@ PFFAIL=1 2 3 4 5 6 7 8 REGRESSTARGETS+=pfail${n} pfail${n}: - @pfctl -nv -R - < ${.CURDIR}/pfail${n}.in > /dev/null 2>&1 && \ - echo 'test pfail${n} does not fail as expected' || true + if pfctl -nv -R - < ${.CURDIR}/pfail${n}.in > /dev/null 2>&1 ; then \ + false ; \ + fi -.PHONY: pfail${n} regress .endfor .for n in ${PFTESTS} REGRESSTARGETS+=pf${n} -pf${n}: pf${n}.out - @cmp -s ${.CURDIR}/pf${n}.ok pf${n}.out || \ - echo 'test pf${n} output does not match expected output' -pf${n}.out: - pfctl -nv -R - < ${.CURDIR}/pf${n}.in > $@ +pf${n}: + pfctl -nv -R - < ${.CURDIR}/pf${n}.in | \ + cmp -s ${.CURDIR}/pf${n}.ok /dev/stdin -.PHONY: pf${n} regress -CLEANFILES+=pf${n}.out .endfor -binat1: binat1.out - @cmp -s ${.CURDIR}/binat1.ok binat1.out || \ - echo 'test binat1 output does not match expected output' - -binat1.out: - pfctl -nv -N - < ${.CURDIR}/binat1.in > $@ - -CLEANFILES+=binat1.out +binat1: + pfctl -nv -N - < ${.CURDIR}/binat1.in | \ + cmp -s ${.CURDIR}/binat1.ok /dev/stdin REGRESSTARGETS+=binat1 +.PHONY: ${REGRESSTARGETS} + .include <bsd.regress.mk> |