From c2d032c26e623561c05b4eec40884b57764cea75 Mon Sep 17 00:00:00 2001 From: jmmv Date: Wed, 9 Jul 2014 00:55:50 +0000 Subject: 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 --- libexec/atf/atf-sh/tests/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libexec/atf') diff --git a/libexec/atf/atf-sh/tests/Makefile b/libexec/atf/atf-sh/tests/Makefile index c7a8ffb..e71b6b5 100644 --- a/libexec/atf/atf-sh/tests/Makefile +++ b/libexec/atf/atf-sh/tests/Makefile @@ -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 -- cgit v1.1