mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
make: do not rely on git to reset the file
The approach works but creates an error using the tools.git "make test" target. It would be nicer to not operate on the actual config.xml that is checked in, but that's something for later as tests need more of their own path use (and tmp directory).
This commit is contained in:
parent
d37ac68481
commit
edc11581b7
1 changed files with 6 additions and 2 deletions
8
Makefile
8
Makefile
|
|
@ -362,15 +362,19 @@ migrate:
|
|||
validate:
|
||||
@${PLUGINCTL} -v
|
||||
|
||||
# XXX we should stop treating AclConfig dir as the test's actual /conf dir
|
||||
TEST_NO_CLOBBER= ${TESTDIR}/app/models/OPNsense/ACL/AclConfig/config.xml
|
||||
|
||||
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 \
|
||||
@cd ${TESTDIR} && cp ${TEST_NO_CLOBBER} ${TEST_NO_CLOBBER}.save && \
|
||||
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
|
||||
mv ${TEST_NO_CLOBBER}.save ${TEST_NO_CLOBBER}
|
||||
.endif
|
||||
|
||||
clean: clean-pkgdir clean-wrksrc clean-mfcdir checkout
|
||||
|
|
|
|||
Loading…
Reference in a new issue