#!/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,,' )
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')
chroot /plc/devel/root su - build <<EOF
$CHROOTBINDIR/$COMMAND $@
EOF
+
}
# Notify recipient of failure or success, manage various stamps
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
set -e
trap failure ERR INT
+ echo -n"==============================> 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
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
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 ;;