svn commit: r291881 - in user/ngie/make_check: . share/mk

Garrett Cooper ngie at FreeBSD.org
Sun Dec 6 00:58:11 UTC 2015


Author: ngie
Date: Sun Dec  6 00:58:09 2015
New Revision: 291881
URL: https://svnweb.freebsd.org/changeset/base/291881

Log:
  Cherrypick ^/user/ngie/more-tests2:r289478,290921 to convert `make regress`
  to `make check`

Modified:
  user/ngie/make_check/Makefile
  user/ngie/make_check/share/mk/atf.test.mk
  user/ngie/make_check/share/mk/bsd.README
  user/ngie/make_check/share/mk/bsd.subdir.mk
  user/ngie/make_check/share/mk/bsd.sys.mk
  user/ngie/make_check/share/mk/bsd.test.mk
  user/ngie/make_check/share/mk/suite.test.mk
Directory Properties:
  user/ngie/make_check/   (props changed)
  user/ngie/make_check/share/   (props changed)

Modified: user/ngie/make_check/Makefile
==============================================================================
--- user/ngie/make_check/Makefile	Sun Dec  6 00:42:11 2015	(r291880)
+++ user/ngie/make_check/Makefile	Sun Dec  6 00:58:09 2015	(r291881)
@@ -112,7 +112,7 @@
 .else
 
 TGTS=	all all-man buildenv buildenvvars buildkernel buildworld \
-	check-old check-old-dirs check-old-files check-old-libs \
+	check check-old check-old-dirs check-old-files check-old-libs \
 	checkdpadd clean cleandepend cleandir cleanworld \
 	delete-old delete-old-dirs delete-old-files delete-old-libs \
 	depend distribute distributekernel distributekernel.debug \
@@ -121,7 +121,7 @@ TGTS=	all all-man buildenv buildenvvars 
 	installkernel.debug packagekernel packageworld \
 	reinstallkernel reinstallkernel.debug \
 	installworld kernel-toolchain libraries lint maninstall \
-	obj objlink regress rerelease showconfig tags toolchain update \
+	obj objlink rerelease showconfig tags toolchain update \
 	_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
 	_build-tools _cross-tools _includes _libraries _depend \
 	build32 builddtb distribute32 install32 xdev xdev-build xdev-install \

Modified: user/ngie/make_check/share/mk/atf.test.mk
==============================================================================
--- user/ngie/make_check/share/mk/atf.test.mk	Sun Dec  6 00:42:11 2015	(r291880)
+++ user/ngie/make_check/share/mk/atf.test.mk	Sun Dec  6 00:58:09 2015	(r291881)
@@ -25,7 +25,7 @@ ATF_TESTS_SH?=
 # Path to the prefix of the installed ATF tools, if any.
 #
 # If atf-run and atf-report are installed from ports, we automatically define a
-# realregress target below to run the tests using these tools.  The tools are
+# realcheck target below to run the tests using these tools.  The tools are
 # searched for in the hierarchy specified by this variable.
 ATF_PREFIX?= /usr/local
 

Modified: user/ngie/make_check/share/mk/bsd.README
==============================================================================
--- user/ngie/make_check/share/mk/bsd.README	Sun Dec  6 00:42:11 2015	(r291880)
+++ user/ngie/make_check/share/mk/bsd.README	Sun Dec  6 00:58:09 2015	(r291881)
@@ -448,6 +448,12 @@ It has seven targets:
 
 	all:
 		build the test programs.
+	check:
+		runs the test programs from the object directory; if the
+		Makefile does not itself define the target test, the
+		targets beforecheck and aftercheck may also be used to
+		cause actions immediately before and after the test
+		target is executed.
 	clean:
 		remove the test programs and any object files.
 	cleandir:
@@ -466,12 +472,6 @@ It has seven targets:
 		run lint on the source files.
 	tags:
 		create a tags file for the source files.
-	test:
-		runs the test programs from the object directory; if the
-		Makefile does not itself define the target test, the
-		targets beforetest and aftertest may also be used to
-		cause actions immediately before and after the test
-		target is executed.
 
 It sets/uses the following variables, among many others:
 

Modified: user/ngie/make_check/share/mk/bsd.subdir.mk
==============================================================================
--- user/ngie/make_check/share/mk/bsd.subdir.mk	Sun Dec  6 00:42:11 2015	(r291880)
+++ user/ngie/make_check/share/mk/bsd.subdir.mk	Sun Dec  6 00:58:09 2015	(r291881)
@@ -37,10 +37,10 @@
 __<bsd.subdir.mk>__:
 
 ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \
-		    checkdpadd clean cleandepend cleandir cleanilinks \
+		    check checkdpadd clean cleandepend cleandir cleanilinks \
 		    cleanobj depend distribute files includes installconfig \
 		    installfiles installincludes realinstall lint maninstall \
-		    manlint obj objlink regress tags \
+		    manlint obj objlink tags \
 		    ${SUBDIR_TARGETS}
 
 # Described above.

Modified: user/ngie/make_check/share/mk/bsd.sys.mk
==============================================================================
--- user/ngie/make_check/share/mk/bsd.sys.mk	Sun Dec  6 00:42:11 2015	(r291880)
+++ user/ngie/make_check/share/mk/bsd.sys.mk	Sun Dec  6 00:58:09 2015	(r291881)
@@ -172,11 +172,11 @@ CXXFLAGS+=	 ${CXXFLAGS.${COMPILER_TYPE}}
 # or expect to ever be up-to-date.
 PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
 		beforelinking build build-tools buildconfig buildfiles \
-		buildincludes checkdpadd clean cleandepend cleandir cleanobj \
-		configure depend dependall distclean distribute exe \
+		buildincludes check checkdpadd clean cleandepend cleandir \
+		cleanobj configure depend dependall distclean distribute exe \
 		files html includes install installconfig installfiles \
 		installincludes lint obj objlink objs objwarn realall \
-		realdepend realinstall regress subdir-all subdir-depend \
+		realdepend realinstall subdir-all subdir-depend \
 		subdir-install tags whereobj
 
 # we don't want ${PROG} to be PHONY

Modified: user/ngie/make_check/share/mk/bsd.test.mk
==============================================================================
--- user/ngie/make_check/share/mk/bsd.test.mk	Sun Dec  6 00:42:11 2015	(r291880)
+++ user/ngie/make_check/share/mk/bsd.test.mk	Sun Dec  6 00:58:09 2015	(r291881)
@@ -76,19 +76,14 @@ PROGS_TARGETS+= install
 .include <suite.test.mk>
 .endif
 
-.if !target(realtest)
-realtest: .PHONY
+.if !target(realcheck)
+realcheck: .PHONY
 	@echo "$@ not defined; skipping"
 .endif
 
-test: .PHONY
-.ORDER: beforetest realtest
-test: beforetest realtest
-
-.if target(aftertest)
-.ORDER: realtest aftertest
-test: aftertest
-.endif
+beforecheck realcheck aftercheck check: .PHONY
+.ORDER: beforecheck realcheck aftercheck
+check: beforecheck realcheck aftercheck
 
 .ifdef PROG
 # we came here via bsd.progs.mk below

Modified: user/ngie/make_check/share/mk/suite.test.mk
==============================================================================
--- user/ngie/make_check/share/mk/suite.test.mk	Sun Dec  6 00:42:11 2015	(r291880)
+++ user/ngie/make_check/share/mk/suite.test.mk	Sun Dec  6 00:58:09 2015	(r291881)
@@ -51,7 +51,7 @@ KYUAFILE?= auto
 
 # Path to the prefix of the installed Kyua CLI, if any.
 #
-# If kyua is installed from ports, we automatically define a realtest target
+# If kyua is installed from ports, we automatically define a realcheck target
 # below to run the tests using this tool.  The tools are searched for in the
 # hierarchy specified by this variable.
 KYUA_PREFIX?= /usr/local
@@ -92,9 +92,13 @@ Kyuafile.auto: Makefile
 	@mv Kyuafile.auto.tmp Kyuafile.auto
 .endif
 
+_kyuafile=	${DESTDIR}${TESTSDIR}/Kyuafile
+
 KYUA?= ${KYUA_PREFIX}/bin/kyua
+
+realcheck: .PHONY
 .if exists(${KYUA})
-# Definition of the "make test" target and supporting variables.
+# Definition of the "make check" target and supporting variables.
 #
 # This target, by necessity, can only work for native builds (i.e. a FreeBSD
 # host building a release for the same system).  The target runs Kyua, which is
@@ -103,35 +107,5 @@ KYUA?= ${KYUA_PREFIX}/bin/kyua
 # Due to the dependencies of the binaries built by the source tree and how they
 # are used by tests, it is highly possible for a execution of "make test" to
 # report bogus results unless the new binaries are put in place.
-realtest: .PHONY
-	@echo "*** WARNING: make test is experimental"
-	@echo "***"
-	@echo "*** Using this test does not preclude you from running the tests"
-	@echo "*** installed in ${TESTSBASE}.  This test run may raise false"
-	@echo "*** positives and/or false negatives."
-	@echo
-	@${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile; \
-	result=0; \
-	echo; \
-	echo "*** Once again, note that "make test" is unsupported."; \
-	test $${result} -eq 0
-.endif
-
-beforetest: .PHONY
-.if defined(TESTSDIR)
-.if ${TESTSDIR} == ${TESTSBASE}
-# Forbid running from ${TESTSBASE}.  It can cause false positives/negatives and
-# it does not cover all the tests (e.g. it misses testing software in external).
-	@echo "*** Sorry, you cannot use make test from src/tests.  Install the"
-	@echo "*** tests into their final location and run them from ${TESTSBASE}"
-	@false
-.else
-	@echo "*** Using this test does not preclude you from running the tests"
-	@echo "*** installed in ${TESTSBASE}.  This test run may raise false"
-	@echo "*** positives and/or false negatives."
-.endif
-.else
-	@echo "*** No TESTSDIR defined; nothing to do."
-	@false
+	@${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile
 .endif
-	@echo


More information about the svn-src-user mailing list