The zsh port fails an additional test when invoked with make clean fake
test instead of make clean test. This is because in its tests it

  touch zerolength
  chgrp $EGID zerolength

and then tests that zerolength has a group of EGID. Since make fake puts
a symlink in ${WRKDIR}/bin from chgrp to /bin/echo and ${WRKDIR}/bin is
first in the environment's PATH, the chgrp does nothing, and test
C02cond fails. With the below patch it completes successfully.

This patch does slightly change behavior as PATH can no longer be set in
TEST_ENV (which no ports seem to do anyway) and install is no longer the
perl wrapper in ${WRKDIR}/bin; however, during tests we probably
shouldn't be messing with install either.

- Matthew Martin


Index: infrastructure/mk/bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1298
diff -u -p -r1.1298 bsd.port.mk
--- infrastructure/mk/bsd.port.mk       19 Jul 2015 17:31:44 -0000      1.1298
+++ infrastructure/mk/bsd.port.mk       27 Aug 2015 03:53:55 -0000
@@ -809,7 +809,7 @@ FAKE_TARGET ?= ${INSTALL_TARGET}
 
 TEST_TARGET ?= test
 TEST_FLAGS ?= 
-TEST_ENV ?=
+TEST_ENV += 
PATH=/usr/bin:/bin:/usr/sbin:/sbin:${DEPBASE}/bin:${LOCALBASE}/bin:${X11BASE}/bin
 ALL_TEST_FLAGS = ${MAKE_FLAGS} ${TEST_FLAGS}
 ALL_TEST_ENV = ${MAKE_ENV} ${TEST_ENV}
 TEST_LOGFILE ?= ${WRKDIR}/test.log

Reply via email to