make: clean up after tests so I don't have to

It has the downside of losing changes to config.xml but
we are far more likely to run the tests than to change
the file.  Ideally, the UUIDs should not shift.
This commit is contained in:
Franco Fichtner 2025-01-09 08:08:28 +01:00
parent 793d925e71
commit 031ca59591

View File

@ -204,9 +204,10 @@ CORE_CONFLICTS+= ${CONFLICT}-devel
CORE_CONFLICTS:= ${CORE_CONFLICTS:S/^/os-/g:O}
WRKDIR?=${.CURDIR}/work
WRKSRC?=${WRKDIR}/src
PKGDIR?=${WRKDIR}/pkg
MFCDIR?=${WRKDIR}/mfc
PKGDIR?=${WRKDIR}/pkg
WRKSRC?=${WRKDIR}/src
TESTDIR?=${.CURDIR}/src/opnsense/mvc/tests
debug:
@${VERSIONBIN} ${@} > /dev/null
@ -560,8 +561,10 @@ test: debug
echo "Installed version does not match, expected ${CORE_PKGVERSION}"; \
exit 1; \
fi
@cd ${.CURDIR}/src/opnsense/mvc/tests && phpunit || true; \
rm -f .phpunit.result.cache
@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
checkout:
@${GIT} reset -q ${.CURDIR}/src && \