From owner-svn-src-user@FreeBSD.ORG Sat Apr 11 08:35:54 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E4E834; Sat, 11 Apr 2015 08:35:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B73FD253; Sat, 11 Apr 2015 08:35:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B8ZsBS077271; Sat, 11 Apr 2015 08:35:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B8Zs5P077270; Sat, 11 Apr 2015 08:35:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110835.t3B8Zs5P077270@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 08:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281419 - user/ngie/more-tests/share/mk X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 08:35:55 -0000 Author: ngie Date: Sat Apr 11 08:35:53 2015 New Revision: 281419 URL: https://svnweb.freebsd.org/changeset/base/281419 Log: Remove FUD-inspiring warnings Try to detect simple cases and guide the user in the right direction Sponsored by: EMC / Isilon Storage Division Modified: user/ngie/more-tests/share/mk/suite.test.mk Modified: user/ngie/more-tests/share/mk/suite.test.mk ============================================================================== --- user/ngie/more-tests/share/mk/suite.test.mk Sat Apr 11 08:34:41 2015 (r281418) +++ user/ngie/more-tests/share/mk/suite.test.mk Sat Apr 11 08:35:53 2015 (r281419) @@ -82,6 +82,29 @@ Kyuafile.auto: Makefile .endif KYUA?= ${KYUA_PREFIX}/bin/kyua + +_kyuafile= ${DESTDIR}${TESTSDIR}/Kyuafile + +kyuafile-check: +.if ${KYUAFILE:tl} != "no" + @if [ ! -f ${_kyuafile} ]; then \ + echo "*** Please run make install and make test for" \ + "end-to-end testing"; \ + false; \ + fi + @if [ "${KYUAFILE:tl}" = yes ]; then \ + ext=; \ + else \ + ext=.auto; \ + fi; \ + if [ ${_kyuafile} -ot Kyuafile$$ext ]; then \ + echo "*** ${_kyuafile} is older than " \ + "${.OBJDIR}/Kyuafile$$ext"; \ + echo "*** Please run make install before running make test"; \ + false; \ + fi +.endif + .if exists(${KYUA}) # Definition of the "make test" target and supporting variables. # @@ -93,35 +116,12 @@ KYUA?= ${KYUA_PREFIX}/bin/kyua # 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 - @set -e; \ - ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile; \ - result=0; \ - echo; \ - echo "*** Once again, note that "make test" is unsupported."; \ - test $${result} -eq 0 + ${KYUA} test -k ${_kyuafile} .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 +beforetest: kyuafile-check +.if !defined(TESTSDIR) @echo "*** No TESTSDIR defined; nothing to do." @false .endif - @echo