From: root Date: Wed, 8 Aug 2007 09:39:31 +0000 (+0000) Subject: add the sendmail function X-Git-Tag: foo~431 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3f1e1fa1f53b7e768b935f99e11edc1e8f98fdd1;p=infrastructure.git add the sendmail function --- diff --git a/scripts/nightly-build.sh b/scripts/nightly-build.sh index d4c7f91..38f5057 100755 --- a/scripts/nightly-build.sh +++ b/scripts/nightly-build.sh @@ -12,12 +12,12 @@ SVNPATH="svn+ssh://build@svn.one-lab.org/svn/build/trunk" DISTRO=onelab MAILTO="onelab-build@one-lab.org" DISTROMAKETAGS=onelab-tags.mk - +PLEBOX=root@planet-lab.eu TESTBUILDURL="http://build.one-lab.org/" 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 #################### # plc chroot runs in UTC DATE=$(date -u +'%Y.%m.%d') @@ -71,7 +71,15 @@ function use_base () { exit 1 fi } - +function test_sendmail(){ + set -x + #under the chroot jail launch an ssh on ple and the script is run there + chroot /plc/devel/root/ ssh ${PLEBOX} /root/${TESTSEND} + if [ "$?" != 0 ] ; then + failure + fi + set +x +} function build () { set -x set -e @@ -177,9 +185,10 @@ function main () { MAKEOPTS=() DO_BUILD=true DO_TEST=true - while getopts "b:ud:t:r:s:nm:s:BTh" opt ; do + while getopts "b:e: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 ;; @@ -212,6 +221,10 @@ function main () { fi BUILD=$ROOT/$BASE + if [ -n "$DO_SEND" ] ; then + test_sendmail ${BUILD} >> ${BUILD}/log-build.txt 2>&1 + fi + if [ -n "$DO_BUILD" ] ; then build >> ${BUILD}/log-build.txt 2>&1 touch ${BUILD}.build-ok