DEFAULT_BASE="@DATE@--@PLDISTRO@-@FCDISTRO@-@PERSONALITY@"
DEFAULT_SVNPATH="http://svn.planet-lab.org/svn/build/trunk"
DEFAULT_TESTSVNPATH="http://svn.planet-lab.org/svn/tests/trunk/system/"
-DEFAULT_TESTCONFIG32="onelab onelab_testbox32"
-DEFAULT_TESTCONFIG64="onelab onelab_testbox64"
+DEFAULT_TESTCONFIG32="main 1vnodes 1testbox32"
+DEFAULT_TESTCONFIG64="main 1vnodes 1testbox64"
DEFAULT_IFNAME=eth0
# web publishing results
mkdir -p ${WEBPATH}
cp $LOG ${WEBLOG}
summary $LOG >> ${WEBLOG}
- (echo -n "============================== $COMMAND: failure at " ; date ; tail -c 20k $WEBLOG) > ${WEBLOG}.ko
+ (echo -n "============================== $COMMAND: failure at " ; date ; tail -c 30k $WEBLOG) > ${WEBLOG}.ko
if [ -n "$MAILTO" ] ; then
- tail -c 20k ${WEBLOG} | mail -s "Failures for build ${BASE}" $MAILTO
+ tail -c 30k ${WEBLOG} | mail -s "Failures for build ${BASE}" $MAILTO
fi
exit 1
}
mkdir -p ${WEBPATH}
cp $LOG ${WEBLOG}
summary $LOG >> ${WEBLOG}
- touch ${WEBLOG}.ok
+ if [ -n "$DO_TEST" ] ; then
+ echo "Successfully built and tested - see testlogs for details" > ${WEBLOG}.pass
+ rm -f ${WEBLOG}.ok
+ else
+ echo "Successfully built"> ${WEBLOG}.ok
+ fi
if [ -n "$MAILTO" ] ; then
(echo "$PLDISTRO ($BASE) build for $FCDISTRO completed on $(date)" ) | mail -s "Successful build for ${BASE}" $MAILTO
fi
url=$(echo $rpm | sed -e "s,/vservers/$BASE/build,${TESTBUILDURL}${PLDISTRO}/${BASE},")
# compute test directory name on test box
- testdir=test-${BASE}
+ testdir=chroot-${BASE}
+ # use another name if any config contains vserver
+ echo $TESTCONFIG | grep vserver &> /dev/null && testdir=vserver-${BASE}
# clean it
ssh ${TESTBOXSSH} rm -rf ${testdir}
# check it out
ssh ${TESTBOXSSH} svn co ${TESTSVNPATH} ${testdir}
# invoke test on testbox - pass url and build url - so the tests can use vtest-init-vserver.sh
- ssh 2>&1 ${TESTBOXSSH} python -u ${testdir}/runtest --build ${SVNPATH} --url ${url} --config "${TESTCONFIG}" --all
-
- if [ "$?" != 0 ] ; then
+ configs=""
+ for config in ${TESTCONFIG} ; do
+ configs="$configs --config $config"
+ done
+
+ # need to proceed despite of set -e
+ success=true
+ ssh 2>&1 ${TESTBOXSSH} ${testdir}/runtest --build ${SVNPATH} --url ${url} $configs --all || success=
+
+ # gather logs in the vserver
+ mkdir -p /vservers/$BASE/build/testlogs
+ ssh 2>&1 ${TESTBOXSSH} tar -C ${testdir}/logs -cf - . | tar -C /vservers/$BASE/build/testlogs -xf - || true
+ # push them to the build web
+ rsync --archive --delete /vservers/$BASE/build/testlogs/ $WEBPATH/$BASE/testlogs/
+ chmod -R a+r $WEBPATH/$BASE/testlogs/
+
+ if [ -z "$success" ] ; then
failure
fi