On Thu, Aug 27, 2015 at 11:50:19AM +0200, Juan Francisco Cantero Hurtado wrote: > Can you try this in your port? > > TEST_ENV="PATH=${PATH}:YOURPATH" or TEST_ENV="PATH=YOURPATH:${PATH}"
I don't think you're following the problem. It's not that anything needs to be added to PATH; it's that the first element needs to be removed. The PATH that ports uses is set by PORTPATH to be ${WRKDIR}/bin:/usr/bin:/bin:/usr/sbin:/sbin:${DEPBASE}/bin:${LOCALBASE}/bin:${X11BASE}/bin With make test, ${WRKDIR}/bin only has install in it, so chgrp runs /bin/chgrp. When make fake is run, a symlink from ${WRKDIR}/bin/chgrp to /bin/echo is added. This resuls in make fake test using the chgrp in ${WRKDIR}/bin and the test failing since that chgrp doesn't change the group. I am proposing to remove ${WRKDIR}/bin from PATH for tests so that all commands work as expected. -Matthew Martin > On Thu, Aug 27, 2015 at 12:37:22AM -0500, Matthew Martin wrote: > > 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 > > > > -- > Juan Francisco Cantero Hurtado http://juanfra.info >