is not used. Convert tests into a common style.
OK anton@
-# $OpenBSD: Makefile,v 1.18 2014/11/24 17:01:29 otto Exp $
+# $OpenBSD: Makefile,v 1.19 2017/07/06 21:33:45 bluhm Exp $
-DC=dc -x
+DC?= dc
+DCFLAGS= -x
+CLEANFILES= *.log
-REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 \
- t18 t19 t20 t21 t22 t23 t24 t25 t26 t27
+REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 \
+ t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 \
+ t20 t21 t22 t23 t24 t25 t26 t27
# .in: input file
# .out: desired result
# t26: non-decimal fractions
# t27: fix a double free
-all: clean ${REGRESS_TARGET}
-
.SUFFIXES: .in
.in:
@echo ${*}
- @${DC} ${.CURDIR}/${*}.in > ${*}.log
+ @${DC} ${DCFLAGS} ${.CURDIR}/${*}.in > ${*}.log
@cmp -s ${.CURDIR}/${*}.out ${*}.log || \
(echo "XXX ${*} failed" && false)
-# Clean all files generated
-clean:
- rm -f *.log
-
.include <bsd.regress.mk>
-# $OpenBSD: Makefile,v 1.7 2014/08/27 15:27:20 kspillner Exp $
+# $OpenBSD: Makefile,v 1.8 2017/07/06 21:33:45 bluhm Exp $
-REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15
+DIFF?= diff
+PATCH?= patch
+PATCHFLAGS= -sb
+CLEANFILES= *.copy *.patch *.orig
-DIFF=diff
-PATCH=patch
-PATCHOPTIONS=-sb
+REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 \
+ t10 t11 t12 t13 t14 t15
# Skip the cmp(1) part for ed(1) style diffs for these tests
EDSKIPCMP=t7 t10 t12
.SUFFIXES: .1 .2
-all: clean ${REGRESS_TARGET}
-
.1:
@cp ${.CURDIR}/${*}.1 ${*}.copy
@cp ${.CURDIR}/${*}.1 ${*}.c.copy
@${DIFF} -c ${.CURDIR}/${*}.1 ${.CURDIR}/${*}.2 > ${*}.c.patch || true
@${DIFF} -u ${.CURDIR}/${*}.1 ${.CURDIR}/${*}.2 > ${*}.u.patch || true
@${DIFF} -e ${.CURDIR}/${*}.1 ${.CURDIR}/${*}.2 > ${*}.e.patch || true
- @${PATCH} ${PATCHOPTIONS} ${*}.copy ${*}.patch || true
- @${PATCH} ${PATCHOPTIONS} ${*}.c.copy ${*}.c.patch || true
- @${PATCH} ${PATCHOPTIONS} ${*}.u.copy ${*}.u.patch || true
- @${PATCH} ${PATCHOPTIONS} ${*}.e.copy ${*}.e.patch || true
+ @${PATCH} ${PATCHFLAGS} ${*}.copy ${*}.patch || true
+ @${PATCH} ${PATCHFLAGS} ${*}.c.copy ${*}.c.patch || true
+ @${PATCH} ${PATCHFLAGS} ${*}.u.copy ${*}.u.patch || true
+ @${PATCH} ${PATCHFLAGS} ${*}.e.copy ${*}.e.patch || true
@cmp -s ${.CURDIR}/${*}.2 ${*}.copy || \
(echo "XXX ${*} standard diff failed" && false)
@cmp -s ${.CURDIR}/${*}.2 ${*}.c.copy || \
t14.1 t15.1:
@cp ${.CURDIR}/${*}.1 ${*}.uw.copy
@${DIFF} -uw ${.CURDIR}/${*}.1 ${.CURDIR}/${*}.2 > ${*}.uw.patch || true
- @${PATCH} ${PATCHOPTIONS} ${*}.uw.copy ${*}.uw.patch || true
+ @${PATCH} ${PATCHFLAGS} ${*}.uw.copy ${*}.uw.patch || true
@cmp -s ${.CURDIR}/${*}.2 ${*}.uw.copy || \
(echo "XXX ${*} unified diff ignoring whitespace failed" && false)
-# Clean all files generated
-clean:
- rm -f *.copy *.patch *.orig
-
.include <bsd.regress.mk>
-# $OpenBSD: Makefile,v 1.9 2017/07/04 23:12:01 bluhm Exp $
+# $OpenBSD: Makefile,v 1.10 2017/07/06 21:33:45 bluhm Exp $
-FILE=file
+FILE?= file
-REGRESS_TARGETS=t0 t1 t2 t3 t4 t5 t6 t7 \
- t8 t9 t10 t11 t15 t17 t18 t19 \
- t20 t21 t22 t30 t31 t32 t33 stdin
+REGRESS_TARGETS= t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 \
+ t10 t11 t15 t17 t18 t19 \
+ t20 t21 t22 \
+ t30 t31 t32 t33 \
+ stdin
# .in: input file
# .out: desired result
-all: ${REGRESS_TARGET}
-
.SUFFIXES: .in
.in:
-# $OpenBSD: Makefile,v 1.12 2017/05/26 20:27:21 tedu Exp $
+# $OpenBSD: Makefile,v 1.13 2017/07/06 21:33:45 bluhm Exp $
-PATCH=patch
-PATCHOPTIONS=-sN
+PATCH?= patch
+PATCHFLAGS= -sN
+CLEANFILES= *.copy *.orig *.rej t5 d19/*
-REGRESS_TARGETS=t1 t2 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
+REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 \
+ t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
-# Currently t3 fails
+t3:
+ @echo ${*} currently fails
+ @echo DISABLED
# .in: input file
# .diff: patch
# t17: diff in ed format that inserts a dot-line.
# t18: diff in ed format that fully replaces input content.
-all: clean ${REGRESS_TARGET}
-
.SUFFIXES: .in
.in:
@echo ${*}
@cp ${.CURDIR}/${*}.in ${*}.copy
- @${PATCH} ${PATCHOPTIONS} ${*}.copy ${.CURDIR}/${*}.diff
+ @${PATCH} ${PATCHFLAGS} ${*}.copy ${.CURDIR}/${*}.diff
@cmp -s ${*}.copy ${.CURDIR}/${*}.out || \
(echo "XXX ${*} failed" && false)
t3:
@echo ${*}
@cp ${.CURDIR}/${*}.in ${*}.copy
- @(! ${PATCH} ${PATCHOPTIONS} ${*}.copy ${.CURDIR}/${*}.diff)
+ @(! ${PATCH} ${PATCHFLAGS} ${*}.copy ${.CURDIR}/${*}.diff)
@cmp -s ${*}.copy ${.CURDIR}/${*}.out || \
(echo "XXX ${*} failed" && false)
t4:
@echo ${*}
@cp ${.CURDIR}/${*}.in ${*}.copy
- @(! ${PATCH} ${PATCHOPTIONS} ${*}.copy ${.CURDIR}/${*}.diff)
+ @(! ${PATCH} ${PATCHFLAGS} ${*}.copy ${.CURDIR}/${*}.diff)
@cmp -s ${*}.copy ${.CURDIR}/${*}.out || \
(echo "XXX ${*} failed" && false)
t5:
@echo ${*}
@rm -f ${*}
- @${PATCH} ${PATCHOPTIONS} < ${.CURDIR}/${*}.diff
+ @${PATCH} ${PATCHFLAGS} < ${.CURDIR}/${*}.diff
@cmp -s ${*} ${.CURDIR}/${*}.out || (echo "XXX ${*} failed" && false)
t13:
@echo ${*}
@cp ${.CURDIR}/${*}.in ${*}.copy
- @(! ${PATCH} ${PATCHOPTIONS} ${*}.copy ${.CURDIR}/${*}.diff)
+ @(! ${PATCH} ${PATCHFLAGS} ${*}.copy ${.CURDIR}/${*}.diff)
@cmp -s ${*}.copy ${.CURDIR}/${*}.out || \
(echo "XXX ${*} failed" && false)
@echo t19
@mkdir -p d19
@cp ${.CURDIR}/t19.in d19/file
- @${PATCH} -t ${PATCHOPTIONS} < ${.CURDIR}/t19.diff
+ @${PATCH} -t ${PATCHFLAGS} < ${.CURDIR}/t19.diff
@cmp -s ${.CURDIR}/t19.out d19/file || (echo "XXX t19 failed" && false)
-
-# Clean all files generated
-clean:
- rm -rf *.copy *.orig *.rej t5 d19
-
.PHONY: t5
.include <bsd.regress.mk>