summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-07-06 21:33:46 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-07-06 21:33:46 +0000
commit7c014623fcfcddbe78bad6de80e8b1eab7eeda1a (patch)
tree589e20e9875f32eb9ebf313efba598a842f27dc3 /regress
parent33629eb0bb6dea797dde90aabeb4ae06208f6761 (diff)
Delete variable REGRESS_TARGET, missing plural S is a typo and it
is not used. Convert tests into a common style. OK anton@
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/dc/Makefile19
-rw-r--r--regress/usr.bin/diff/Makefile28
-rw-r--r--regress/usr.bin/file/Makefile14
-rw-r--r--regress/usr.bin/patch/Makefile33
4 files changed, 42 insertions, 52 deletions
diff --git a/regress/usr.bin/dc/Makefile b/regress/usr.bin/dc/Makefile
index 0d6d0209081..e4a98d05280 100644
--- a/regress/usr.bin/dc/Makefile
+++ b/regress/usr.bin/dc/Makefile
@@ -1,9 +1,12 @@
-# $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
@@ -36,18 +39,12 @@ REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 \
# 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>
diff --git a/regress/usr.bin/diff/Makefile b/regress/usr.bin/diff/Makefile
index fafa16c05fd..833078a7f46 100644
--- a/regress/usr.bin/diff/Makefile
+++ b/regress/usr.bin/diff/Makefile
@@ -1,10 +1,12 @@
-# $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
@@ -31,8 +33,6 @@ EDSKIPCMP=t7 t10 t12
.SUFFIXES: .1 .2
-all: clean ${REGRESS_TARGET}
-
.1:
@cp ${.CURDIR}/${*}.1 ${*}.copy
@cp ${.CURDIR}/${*}.1 ${*}.c.copy
@@ -42,10 +42,10 @@ all: clean ${REGRESS_TARGET}
@${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 || \
@@ -59,12 +59,8 @@ all: clean ${REGRESS_TARGET}
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>
diff --git a/regress/usr.bin/file/Makefile b/regress/usr.bin/file/Makefile
index e0fff44ab52..1fb40fcba84 100644
--- a/regress/usr.bin/file/Makefile
+++ b/regress/usr.bin/file/Makefile
@@ -1,16 +1,16 @@
-# $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:
diff --git a/regress/usr.bin/patch/Makefile b/regress/usr.bin/patch/Makefile
index 314a7339110..73781e33724 100644
--- a/regress/usr.bin/patch/Makefile
+++ b/regress/usr.bin/patch/Makefile
@@ -1,11 +1,15 @@
-# $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
@@ -28,40 +32,38 @@ REGRESS_TARGETS=t1 t2 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
# 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)
@@ -69,14 +71,9 @@ t19:
@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>