build/test: test plugins against core package, also lint

This commit is contained in:
Franco Fichtner 2016-06-03 12:10:25 +02:00
parent fa82feadb0
commit bb1deef226
2 changed files with 26 additions and 0 deletions

View File

@ -681,6 +681,14 @@ setup_stage()
shift
# kill stale pids for chrooted daemons
if [ -d ${STAGE}/var/run ]; then
PIDS=$(find ${STAGE}/var/run -name "*.pid")
for PID in ${PIDS}; do
pkill -F ${PID};
done
fi
# might have been a chroot
for DIR in ${MOUNTDIRS}; do
if [ -d ${STAGE}${DIR} ]; then

View File

@ -34,12 +34,30 @@ SELF=test
setup_stage ${STAGEDIR}
setup_base ${STAGEDIR}
setup_clone ${STAGEDIR} ${COREDIR}
setup_clone ${STAGEDIR} ${PLUGINSDIR}
setup_chroot ${STAGEDIR}
extract_packages ${STAGEDIR}
install_packages ${STAGEDIR} ${PRODUCT_TYPE} pear-PHP_CodeSniffer phpunit
# don't want to deinstall in case of testing...
# install all plugins, see if files clash
# between those and PRODUCT_TYPE package
for PKGFILE in $({
cd ${STAGEDIR}
# ospriv- means development so is ok to break
# (left in here for manual testing workflow)
#find .${PACKAGESDIR}/All -name "ospriv-*.txz"
find .${PACKAGESDIR}/All -name "os-*.txz"
}); do
pkg -c ${BASEDIR} add ${PKGFILE}
done
echo ">>> Running ${PLUGINSDIR} test suite..."
chroot ${STAGEDIR} /bin/sh -es <<EOF
make -C${PLUGINSDIR} lint
EOF
echo ">>> Running ${COREDIR} test suite..."
chroot ${STAGEDIR} /bin/sh -es <<EOF