make: don't taint common with these directories

While they are common they are needed for stand-alone support so
plugins.git will define them as well.

Slightly mod the test target for future reuse.  Avoid plain "git" use.
This commit is contained in:
Franco Fichtner 2025-08-01 08:50:28 +02:00
parent ccfa210433
commit a7ee273d68
3 changed files with 11 additions and 9 deletions

View file

@ -215,7 +215,7 @@ CORE_CONFLICTS:= ${CORE_CONFLICTS:S/^/os-/g:O}
mount:
@if [ ! -f ${WRKDIR}/.mount_done ]; then \
echo -n "Enabling core.git live mount..."; \
echo -n "Enabling core live mount..."; \
sed ${SED_REPLACE} ${.CURDIR}/src/${VERSIONFILE}.in > \
${.CURDIR}/src/${VERSIONFILE}; \
mount_unionfs ${.CURDIR}/src ${LOCALBASE}; \
@ -226,7 +226,7 @@ mount:
umount:
@if [ -f ${WRKDIR}/.mount_done ]; then \
echo -n "Disabling core.git live mount..."; \
echo -n "Disabling core live mount..."; \
umount -f "<above>:${.CURDIR}/src"; \
rm ${WRKDIR}/.mount_done; \
echo "done"; \
@ -371,13 +371,15 @@ validate:
@src/opnsense/mvc/script/run_validations.php
test:
.if exists(${TESTDIR})
@if [ "$$(${VERSIONBIN} -v)" != "${CORE_PKGVERSION}" ]; then \
echo "Installed version does not match, expected ${CORE_PKGVERSION}"; \
exit 1; \
fi
@cd ${TESTDIR} && phpunit || true; rm -rf ${TESTDIR}/.phpunit.result.cache \
${TESTDIR}/app/models/OPNsense/ACL/AclConfig/backup; \
git checkout -f ${TESTDIR}/app/models/OPNsense/ACL/AclConfig/config.xml
${GIT} checkout -f ${TESTDIR}/app/models/OPNsense/ACL/AclConfig/config.xml
.endif
clean: clean-pkgdir clean-wrksrc clean-mfcdir checkout

View file

@ -26,12 +26,6 @@
# pin the core reference directory from the parse directory of this file
COREREFDIR:= ${.PARSEDIR}/..
WRKDIR?= ${.CURDIR}/work
MFCDIR?= /tmp/mfc.dir
PKGDIR?= ${WRKDIR}/pkg
WRKSRC?= ${WRKDIR}/src
TESTDIR?= ${.CURDIR}/src/opnsense/mvc/tests
clean-pkgdir:
@rm -rf ${PKGDIR}
@mkdir -p ${PKGDIR}

View file

@ -103,3 +103,9 @@ SED_REPLACE= # empty
MAKE_REPLACE+= ${REPLACEMENT}="${${REPLACEMENT}}"
SED_REPLACE+= -e "s=%%${REPLACEMENT}%%=${${REPLACEMENT}}=g"
.endfor
WRKDIR?= ${.CURDIR}/work
MFCDIR?= /tmp/mfc.dir
PKGDIR?= ${WRKDIR}/pkg
WRKSRC?= ${WRKDIR}/src
TESTDIR?= ${.CURDIR}/src/opnsense/mvc/tests