Date: Mon, 13 Apr 2015 10:32:54 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281492 - in user/ngie/more-tests: . share/mk Message-ID: <201504131032.t3DAWs51011091@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Apr 13 10:32:53 2015 New Revision: 281492 URL: https://svnweb.freebsd.org/changeset/base/281492 Log: Revive regress target and kill off test target instead bin/test being present causes the unfortunate issue of make test being run on the bin/ subdir, which subsequently causes things to fall apart when running make buildworld make regress is the legacy target, so use it instead While here, in order to deal with recursion issues and executing make regress both at subdirectories (which could yield the wrong results depending on how things are installed) Modified: user/ngie/more-tests/Makefile user/ngie/more-tests/share/mk/atf.test.mk user/ngie/more-tests/share/mk/bsd.README user/ngie/more-tests/share/mk/bsd.sys.mk user/ngie/more-tests/share/mk/bsd.test.mk user/ngie/more-tests/share/mk/suite.test.mk Modified: user/ngie/more-tests/Makefile ============================================================================== --- user/ngie/more-tests/Makefile Mon Apr 13 10:30:30 2015 (r281491) +++ user/ngie/more-tests/Makefile Mon Apr 13 10:32:53 2015 (r281492) @@ -109,7 +109,7 @@ TGTS= all all-man buildenv buildenvvars installkernel.debug packagekernel packageworld \ reinstallkernel reinstallkernel.debug \ installworld kernel-toolchain libraries lint maninstall \ - obj objlink rerelease showconfig tags test toolchain update \ + obj objlink regress 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/more-tests/share/mk/atf.test.mk ============================================================================== --- user/ngie/more-tests/share/mk/atf.test.mk Mon Apr 13 10:30:30 2015 (r281491) +++ user/ngie/more-tests/share/mk/atf.test.mk Mon Apr 13 10:32:53 2015 (r281492) @@ -43,7 +43,7 @@ ATFFILE?= auto # 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 -# realtest target below to run the tests using these tools. The tools are +# realregress 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 @@ -164,7 +164,7 @@ ATF_RUN?= ${ATF_PREFIX}/bin/atf-run _TESTS_FIFO= ${.OBJDIR}/atf-run.fifo _TESTS_LOG= ${.OBJDIR}/atf-run.log CLEANFILES+= ${_TESTS_FIFO} ${_TESTS_LOG} -realtest: .PHONY +realregress: .PHONY @set -e; \ if [ -z "${TESTSDIR}" ]; then \ echo "*** No TESTSDIR defined; nothing to do."; \ Modified: user/ngie/more-tests/share/mk/bsd.README ============================================================================== --- user/ngie/more-tests/share/mk/bsd.README Mon Apr 13 10:30:30 2015 (r281491) +++ user/ngie/more-tests/share/mk/bsd.README Mon Apr 13 10:32:53 2015 (r281492) @@ -401,14 +401,14 @@ It has seven targets: install target is executed. lint: 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 + regress: + runs the test programs from the installed 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 + targets beforeregress and afterregress may also be used to + cause actions immediately before and after the regress target is executed. + tags: + create a tags file for the source files. It sets/uses the following variables, among many others: Modified: user/ngie/more-tests/share/mk/bsd.sys.mk ============================================================================== --- user/ngie/more-tests/share/mk/bsd.sys.mk Mon Apr 13 10:30:30 2015 (r281491) +++ user/ngie/more-tests/share/mk/bsd.sys.mk Mon Apr 13 10:32:53 2015 (r281492) @@ -170,8 +170,8 @@ PHONY_NOTMAIN = afterdepend afterinstall depend dependall distclean distribute exe \ html includes install installfiles installincludes lint \ obj objlink objs objwarn realall realdepend \ - realinstall subdir-all subdir-depend subdir-install \ - tags test whereobj + realinstall regress subdir-all subdir-depend subdir-install \ + tags whereobj .PHONY: ${PHONY_NOTMAIN} .NOTMAIN: ${PHONY_NOTMAIN} Modified: user/ngie/more-tests/share/mk/bsd.test.mk ============================================================================== --- user/ngie/more-tests/share/mk/bsd.test.mk Mon Apr 13 10:30:30 2015 (r281491) +++ user/ngie/more-tests/share/mk/bsd.test.mk Mon Apr 13 10:32:53 2015 (r281492) @@ -77,14 +77,14 @@ PROGS_TARGETS+= install .include <suite.test.mk> .endif -.if !target(realtest) -realtest: .PHONY +.if !target(realregress) +realregress: .PHONY @echo "$@ not defined; skipping" .endif -beforetest realtest aftertest test: .PHONY -.ORDER: beforetest realtest aftertest -test: beforetest realtest aftertest +beforeregress realregress afterregress regress: .PHONY +.ORDER: beforeregress realregress afterregress +regress: beforeregress realregress afterregress .if !empty(SUBDIR) .include <bsd.subdir.mk> Modified: user/ngie/more-tests/share/mk/suite.test.mk ============================================================================== --- user/ngie/more-tests/share/mk/suite.test.mk Mon Apr 13 10:30:30 2015 (r281491) +++ user/ngie/more-tests/share/mk/suite.test.mk Mon Apr 13 10:32:53 2015 (r281492) @@ -44,7 +44,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 realregress 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 @@ -85,7 +85,7 @@ KYUA?= ${KYUA_PREFIX}/bin/kyua _kyuafile= ${DESTDIR}${TESTSDIR}/Kyuafile -realtest: .PHONY +realregress: .PHONY .if exists(${KYUA}) # Definition of the "make test" target and supporting variables. # @@ -96,11 +96,11 @@ realtest: .PHONY # 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: +realregress: @${KYUA} test -k ${_kyuafile} .endif -beforetest: .PHONY +beforeregress: .PHONY .if !defined(TESTSDIR) @echo "*** No TESTSDIR defined; nothing to do." @false
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504131032.t3DAWs51011091>