summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-09-27 18:27:15 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-09-27 18:27:15 +0000
commit3cdaad136d88a15ef65c0f7b40c4389359b73818 (patch)
tree2f294e4750f7731ab169f2ec4775b3ee4abfdd5f /regress
parent336a82dbf73e198762ff6e275e7518021fefdd8e (diff)
Bring this regress into nicer shape. Add all recent architectures.
For me it is still unclear what should actually be tested. It runs MAKEDEV, stores the result into an outfile and checks nothing.
Diffstat (limited to 'regress')
-rw-r--r--regress/etc/MAKEDEV/Makefile82
1 files changed, 41 insertions, 41 deletions
diff --git a/regress/etc/MAKEDEV/Makefile b/regress/etc/MAKEDEV/Makefile
index 454507dc41b..7e16b39d8a1 100644
--- a/regress/etc/MAKEDEV/Makefile
+++ b/regress/etc/MAKEDEV/Makefile
@@ -1,48 +1,48 @@
+# $OpenBSD: Makefile,v 1.38 2021/09/27 18:27:14 bluhm Exp $
+
+ARCHS =
+ARCHS += alpha amd64 arm64 armv7
+ARCHS += hppa
+ARCHS += i386
+ARCHS += landisk loongson luna88k
+ARCHS += macppc
+ARCHS += octeon
+ARCHS += powerpc64
+ARCHS += riscv64
+ARCHS += sparc64
+
+DEVS = all ramdisk
+
+ETCSRCDIR ?= ${.CURDIR}/../../../etc
+
+REGRESS_TARGETS =
+
+.for a in ${ARCHS}
+.for d in ${DEVS}
+
+REGRESS_TARGETS += run-$a-$d
+run-$a-$d:
+ ${SUDO} rm -rf -- $a-$d.dir
+ mkdir -m 700 $a-$d.dir
+ cp ${ETCSRCDIR}/etc.$a/MAKEDEV $a-$d.dir/
+ ${SUDO} chown root:wheel $a-$d.dir
+ ${SUDO} time sh -c 'cd $a-$d.dir && sh ./MAKEDEV $d'
+ ${SUDO} ls -ln $a-$d.dir/ | \
+ awk '/^[bcps]/ {printf "%s %x.%x %x,%x%s\n",$$1,$$3,$$4,$$5,$$6,$$10} \
+ /^l/ {printf "%s %s.%s%s>%s\n",$$1,$$3,$$4,$$9,$$11}' | \
+ sort +5 -n | \
+ sed -e 's/rwx/7/g;s/rw-/6/g;s/r-x/5/g;s/r--/4/g' \
+ -e 's/-wx/3/g;s/-w-/2/g;s/--x/1/g;s/---/0/g' \
+ -e 's/^\([bcpsl]\)\([0-9][0-9]*\) /\2\1/' \
+ >$a-$d.out
-# $OpenBSD: Makefile,v 1.37 2021/05/01 16:11:09 visa Exp $
-
-MAKEDEVARCHS+=alpha amd64 armv7 hppa i386 landisk
-MAKEDEVARCHS+=loongson luna88k macppc
-MAKEDEVARCHS+=sparc64
-
-MAKEDEVTARGS?=all ramdisk
-
-ETCSRCDIR?= /usr/src/etc
-
-REGRESS_SLOW_TARGETS=${REGRESS_TARGETS}
-
-# test separate targets, all, ramdisk/raminst, std, etc
-# t1 = all
-# t2 = ramdisk
+.endfor
+.endfor
-REGRESS_TARGETS+= ${MAKEDEVARCHS}
REGRESS_ROOT_TARGETS=${REGRESS_TARGETS}
-${REGRESS_TARGETS}:
-. for _T in ${MAKEDEVTARGS}
- @echo "====> ${_T}.${.TARGET}"
- @exec ${SUDO} rm -rf test.${_T}.${.TARGET}
- @exec mkdir -p -m 700 test.${_T}.${.TARGET}
- @exec cp ${ETCSRCDIR}/etc.${.TARGET}/MAKEDEV test.${_T}.${.TARGET}
- @exec ${SUDO} chown root:wheel test.${_T}.${.TARGET}
- @cd test.${_T}.${.TARGET}; \
- time ${SUDO} sh ./MAKEDEV ${_T} || true; \
- time ${SUDO} sh ./MAKEDEV ${_T} || true; \
- ( ls -ln; ls -ln fd/ ) 2> /dev/null | \
- awk '/^[bcps]/ {printf "%s %x.%x %x,%x%s\n",$$1,$$3,$$4,$$5,$$6,$$10} \
- /^l/ {printf "%s %s.%s%s>%s\n",$$1,$$3,$$4,$$9,$$11}' | \
- sort +5 -n | \
- sed -e 's/rwx/7/g;s/rw-/6/g;s/r-x/5/g;s/r--/4/g' \
- -e 's/-wx/3/g;s/-w-/2/g;s/--x/1/g;s/---/0/g' \
- -e 's/^\([bcpsl]\)\([0-9][0-9]*\) /\2\1/' \
- > ../t1.${_T}.${.TARGET}.out
-.endfor
-
clean:
- for f in ${MAKEDEVARCHS}; do rm -rf test.$$f; done
- rm -f ${CLEANFILES}
-
-.PHONY: ${MAKEDEVARCHS}
-CLEANFILES+=t1.*.out
+ ${SUDO} rm -rf -- *-*.dir/
+ ${SUDO} rm -f -- *-*.out
.include <bsd.regress.mk>