svn commit: r322021 - projects/make-check-sandbox/share/mk

Ngie Cooper ngie at FreeBSD.org
Thu Aug 3 17:42:15 UTC 2017


Author: ngie
Date: Thu Aug  3 17:42:13 2017
New Revision: 322021
URL: https://svnweb.freebsd.org/changeset/base/322021

Log:
  Always expose DESTDIR as MAKE_CHECK_SANDBOX_DIR and always add it to CLEANDIRS
  This removes a need for passing CLEANDIRS in to "make clean" in a slightly
  convoluted way.
  
  Also, remove the ${MAKE_CHECK_SANDBOX_DIR} is already present -> bail logic.
  It was incredibly annoying dealing with false positives/failures (of which
  there are a handful in the tree with tests). It's better to just assume that
  the user is smart enough to do the right thing and not invoke "make check"
  (sandboxed) multiple times, keeping ${MAKE_CHECK_SANDBOX_DIR}.

Modified:
  projects/make-check-sandbox/share/mk/suite.test.mk

Modified: projects/make-check-sandbox/share/mk/suite.test.mk
==============================================================================
--- projects/make-check-sandbox/share/mk/suite.test.mk	Thu Aug  3 17:33:59 2017	(r322020)
+++ projects/make-check-sandbox/share/mk/suite.test.mk	Thu Aug  3 17:42:13 2017	(r322021)
@@ -103,18 +103,13 @@ realcheck: .PHONY
 	fi
 	@env ${TESTS_ENV:Q} ${KYUA} test -k ${CHECKDIR}/Kyuafile
 
+MAKE_CHECK_SANDBOX_DIR=	${.OBJDIR}/checkdir
+CLEANDIRS+=	${MAKE_CHECK_SANDBOX_DIR}
+
 .if ${MK_MAKE_CHECK_USE_SANDBOX} != "no" && make(check)
-DESTDIR:=	${.OBJDIR}/checkdir
-CLEANDIRS+=	${DESTDIR}
+DESTDIR:=	${MAKE_CHECK_SANDBOX_DIR}
 
-# XXX (ngie): use daemon(1) and a pidfile to lock the directory?
 beforecheck:
-	@if [ -d "${DESTDIR}" ]; then \
-		echo "${DESTDIR} already exists"; \
-		echo "Aborting to avoid false positives with potentially" \
-		     "parallel instances of '${MAKE} check'"; \
-		false; \
-	fi
 .for t in clean all
 	@cd ${.CURDIR} && ${MAKE} $t
 .endfor


More information about the svn-src-projects mailing list