summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Krause <david@cvs.openbsd.org>2004-06-21 18:05:10 +0000
committerDavid Krause <david@cvs.openbsd.org>2004-06-21 18:05:10 +0000
commit2f855519ad2f654ff4ab92155d2728203942aeb5 (patch)
treee4b3e9226e0aae765fb3b727dd2afd20ed663c68
parent4bec4aa27bbc7fe2179f868d53624a38c3f8c347 (diff)
always run userldt regress, but enable the sysctl if needed
ok millert@
-rw-r--r--regress/sys/arch/i386/ldt/Makefile21
1 files changed, 18 insertions, 3 deletions
diff --git a/regress/sys/arch/i386/ldt/Makefile b/regress/sys/arch/i386/ldt/Makefile
index 6d98c5a12f1..96990013340 100644
--- a/regress/sys/arch/i386/ldt/Makefile
+++ b/regress/sys/arch/i386/ldt/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.5 2004/03/02 07:07:34 david Exp $
+# $OpenBSD: Makefile,v 1.6 2004/06/21 18:05:09 david Exp $
# $NetBSD: Makefile,v 1.3 1995/04/20 22:42:19 cgd Exp $
#
# C Optimizer (-O) breaks this program - don't use !!
@@ -8,11 +8,26 @@ PROG= testldt
DPADD+= ${LIBARCH}
LDADD+= -li386
-USERLDT!=sysctl -n machdep.userldt
+USERLDT_ENABLE!=sysctl -n machdep.userldt
-.if ${MACHINE_ARCH} != "i386" || $(USERLDT) == 0
+.ifmake !obj && !clean && !cleandir && !depend && !regress
+.INTERRUPT:
+ -@${SUDO} sysctl -q machdep.userldt=${USERLDT_ENABLE}
+
+.END:
+ -@${SUDO} sysctl -q machdep.userldt=${USERLDT_ENABLE}
+.endif
+
+.if ${MACHINE_ARCH} != "i386"
REGRESS_SKIP="yes"
.endif
+do-testldt: ${PROG}
+ @${SUDO} sysctl -q machdep.userldt=1
+ ./${PROG}
+
+REGRESS_TARGETS=do-testldt
+.PHONY: ${REGRESS_TARGETS}
+
.include <bsd.regress.mk>