From owner-svn-src-all@FreeBSD.ORG Wed Jul 9 00:55:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C04A14F5; Wed, 9 Jul 2014 00:55:51 +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 AD1502AB5; Wed, 9 Jul 2014 00:55:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s690tplN026160; Wed, 9 Jul 2014 00:55:51 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s690toYE026156; Wed, 9 Jul 2014 00:55:50 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201407090055.s690toYE026156@svn.freebsd.org> From: Julio Merino Date: Wed, 9 Jul 2014 00:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268445 - in head: libexec/atf/atf-sh/tests share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 00:55:51 -0000 Author: jmmv Date: Wed Jul 9 00:55:50 2014 New Revision: 268445 URL: http://svnweb.freebsd.org/changeset/base/268445 Log: Fix atf-sh's integration_test With the move of atf-sh into /usr/libexec in r267181, some of the tests in the integration_test program broke because they could not execute atf-sh from the path any longer. This slipped through because I do have a local atf installation in my home directory that appears in my path, hence the tests could still execute my own version. Fix this by forcing /usr/libexec to appear at the beginning of the path when attempting to execute atf-sh. To make upgrading easy (and to avoid an unnecessary entry in UPDATING), make integration_test depend on the Makefile so that a rebuild of the shell script is triggered. This requires a hack in the *.test.mk files to ensure the Makefile is not treated as a source to the generated program. Ugly, I know, but I don't have a better way of doing this at the moment. Will think of one once I address the TODO in the *.test.mk files that suggests generalizing the file generation functionality. PR: 191052 Reviewed by: Garrett Cooper Modified: head/libexec/atf/atf-sh/tests/Makefile head/share/mk/atf.test.mk head/share/mk/plain.test.mk head/share/mk/tap.test.mk Modified: head/libexec/atf/atf-sh/tests/Makefile ============================================================================== --- head/libexec/atf/atf-sh/tests/Makefile Wed Jul 9 00:12:56 2014 (r268444) +++ head/libexec/atf/atf-sh/tests/Makefile Wed Jul 9 00:55:50 2014 (r268445) @@ -10,12 +10,15 @@ ATF= ${.CURDIR:H:H:H:H}/contrib/atf ATF_TESTS_SH+= atf_check_test ATF_TESTS_SH+= config_test ATF_TESTS_SH+= integration_test -ATF_TESTS_SH_SED_integration_test= \ - -e 's,/usr/bin/env *atf-sh,/usr/libexec/atf-sh,g' ATF_TESTS_SH+= normalize_test ATF_TESTS_SH+= tc_test ATF_TESTS_SH+= tp_test +integration_test: Makefile +ATF_TESTS_SH_SED_integration_test= \ + -e 's,atf_check,PATH=/usr/libexec:$${PATH} atf_check,g' \ + -e 's,/usr/bin/env *atf-sh,/usr/libexec/atf-sh,g' + SCRIPTS+= misc_helpers SCRIPTSDIR_misc_helpers=${TESTSDIR} CLEANFILES+= misc_helpers misc_helpers.tmp Modified: head/share/mk/atf.test.mk ============================================================================== --- head/share/mk/atf.test.mk Wed Jul 9 00:12:56 2014 (r268444) +++ head/share/mk/atf.test.mk Wed Jul 9 00:55:50 2014 (r268445) @@ -105,7 +105,8 @@ ATF_TESTS_SH_SED_${_T}?= # empty ATF_TESTS_SH_SRC_${_T}?= ${_T}.sh ${_T}: ${ATF_TESTS_SH_SRC_${_T}} echo '#! /usr/libexec/atf-sh' > ${.TARGET}.tmp - cat ${.ALLSRC} | sed ${ATF_TESTS_SH_SED_${_T}} >>${.TARGET}.tmp + cat ${.ALLSRC:N*Makefile*} \ + | sed ${ATF_TESTS_SH_SED_${_T}} >>${.TARGET}.tmp chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} .endfor Modified: head/share/mk/plain.test.mk ============================================================================== --- head/share/mk/plain.test.mk Wed Jul 9 00:12:56 2014 (r268444) +++ head/share/mk/plain.test.mk Wed Jul 9 00:55:50 2014 (r268445) @@ -57,7 +57,8 @@ CLEANFILES+= ${_T} ${_T}.tmp PLAIN_TESTS_SH_SED_${_T}?= # empty PLAIN_TESTS_SH_SRC_${_T}?= ${_T}.sh ${_T}: ${PLAIN_TESTS_SH_SRC_${_T}} - cat ${.ALLSRC} | sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp + cat ${.ALLSRC:N*Makefile*} \ + | sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} .endfor Modified: head/share/mk/tap.test.mk ============================================================================== --- head/share/mk/tap.test.mk Wed Jul 9 00:12:56 2014 (r268444) +++ head/share/mk/tap.test.mk Wed Jul 9 00:55:50 2014 (r268445) @@ -66,7 +66,7 @@ TAP_TESTS_PERL_SRC_${_T}?= ${_T}.pl ${_T}: ${TAP_TESTS_PERL_SRC_${_T}} { \ echo '#! ${TAP_PERL_INTERPRETER}'; \ - cat ${.ALLSRC} | sed ${TAP_TESTS_PERL_SED_${_T}}; \ + cat ${.ALLSRC:N*Makefile*} | sed ${TAP_TESTS_PERL_SED_${_T}}; \ } >${.TARGET}.tmp chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET}