From: root Date: Thu, 9 Aug 2007 13:59:21 +0000 (+0000) Subject: Fix the testrun function to manage the make install behavior X-Git-Tag: foo~430 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1a964b0455858667bf48dc158f007864b5ec7fc5;p=infrastructure.git Fix the testrun function to manage the make install behavior --- diff --git a/scripts/nightly-build.sh b/scripts/nightly-build.sh index 38f5057..dd1575e 100755 --- a/scripts/nightly-build.sh +++ b/scripts/nightly-build.sh @@ -1,5 +1,5 @@ #!/bin/bash - +##export PATH=/usr/sbin:/sbin:/usr/bin:/bin # use svn propset svn:keywords Revision to enable this REVISION=$(echo '$Revision$' | sed -e 's,\$,,g' -e 's,^\w*:\s,,' ) @@ -14,10 +14,11 @@ MAILTO="onelab-build@one-lab.org" DISTROMAKETAGS=onelab-tags.mk PLEBOX=root@planet-lab.eu TESTBUILDURL="http://build.one-lab.org/" +TESTBOX=onelab-test.inria.fr TESTBOXSSH=root@onelab-test.inria.fr TESTSVNPATH="svn+ssh://build@svn.one-lab.org/svn/new_plc_api/trunk/plctest" TESTSCRIPT=TestMain.py -TESTSEND=test_sendmail.py +TESTSEND=TestSendMail #################### # plc chroot runs in UTC DATE=$(date -u +'%Y.%m.%d') @@ -27,6 +28,7 @@ function do_chroot () { chroot /plc/devel/root su - build < testing the sendmail service on PLE" + #under the chroot jail launch an ssh on ple and the script is run there + ssh ${PLEBOX} python -u /root/${TESTSEND} + echo -n "============================== Starting $COMMAND:runtest on " date - ### compute URL to the myplc package + + ### compute URL to the myplc package build=$1; shift buildname=$(basename $build) cd $build @@ -135,9 +135,10 @@ function runtest () { rsync -a -v plctest/ ${TESTBOXSSH}:${testdir} # invoke test on testbox ssh ${TESTBOXSSH} python -u ${testdir}/${TESTSCRIPT} ${url} - #invoke make install from build to the testbox - ## (echo "cd build/${DISTRO}/${buildname}/ && make install PLCHOST=${TESTBOXSSH}") | chroot /plc/devel/root - if [ "$?" != 0 ] ; then + #invoke make install from build to the testbox + make install PLCHOST=${TESTBOX} + + if [ "$?" != 0 ] ; then failure fi @@ -185,10 +186,9 @@ function main () { MAKEOPTS=() DO_BUILD=true DO_TEST=true - while getopts "b:e:ud:t:r:s:nm:s:BTh" opt ; do + while getopts "b:ud:t:r:s:nm:s:BTh" opt ; do case $opt in b) BASE=$OPTARG ;; - e) DO_SEND= ;; u) USEOLD=true ;; d) DISTRO=$OPTARG ;; t) DISTROMAKETAGS=$OPTARG ;;