DEFAULT_PERSONALITY=linux32
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/"
+# TESTSVNPATH to be computed from the -tags.mk file - no default anymore
DEFAULT_TESTCONFIG="default"
DEFAULT_IFNAME=eth0
make -C /build $DRY_RUN "${MAKEVARS[@]}" stage1=true
# versions
make -C /build $DRY_RUN "${MAKEVARS[@]}" versions
+ # store testsvnpath
+ make -C /build $DRY_RUN "${MAKEVARS[@]}" stage1=true testsvnpath
# actual stuff
make -C /build $DRY_RUN "${MAKEVARS[@]}" $MAKETARGETS
echo -n "============================== Starting $COMMAND:runtest on $(date)"
- ### the URL to the myplc package
- rpm=$( find /vservers/$BASE/build/RPMS -name 'myplc-[0-9]*' )
- if [ ${#rpm[@]} != 1 ] ; then
- echo "$COMMAND: Cannot locate rpm for testing"
+ # where to find TESTSVNPATH
+ stamp=/vservers/$BASE/build/testsvnpath
+ if [ ! -f $stamp ] ; then
+ echo "$COMMAND: Cannot figure TESTSVNPATH from missing $stamp"
+ failure
+ exit 1
+ fi
+ TESTSVNPATH=$(cat $stamp)
+ # use only this pat of the tests right now
+ TESTSVNPATH=${TESTSVNPATH}/system
+
+ ### the URL to the RPMS/<arch> location
+ url=""
+ for a in i386 x86_64; do
+ archdir=/vservers/$BASE/build/RPMS/$a
+ if [ -d $archdir ] ; then
+ url=$(echo $archdir | sed -e "s,/vservers/$BASE/build,${TESTBUILDURL}${PLDISTRO}/${BASE},")
+ break
+ fi
+ done
+
+ if [ -z "$url" ] ; then
+ echo "$COMMAND: Cannot locate arch URL for testing"
failure
exit 1
fi
- url=$(echo $rpm | sed -e "s,/vservers/$BASE/build,${TESTBUILDURL}${PLDISTRO}/${BASE},")
# test directory name on test box
testdir=${BASE}
# clean it
- ssh ${TESTBOXSSH} rm -rf ${testdir}
+ ssh -n ${TESTBOXSSH} rm -rf ${testdir}
# check it out
- ssh ${TESTBOXSSH} svn co ${TESTSVNPATH} ${testdir}
+ ssh -n ${TESTBOXSSH} svn co ${TESTSVNPATH} ${testdir}
# invoke test on testbox - pass url and build url - so the tests can use vtest-init-vserver.sh
configs=""
for config in ${TESTCONFIG} ; do
# need to proceed despite of set -e
success=true
- ssh 2>&1 ${TESTBOXSSH} ${testdir}/runtest --build ${SVNPATH} --url ${url} $configs --all || success=
+ ssh 2>&1 -n ${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
+ ssh 2>&1 -n ${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/
echo " -t pldistrotags - defaults to \${PLDISTRO}-tags.mk"
echo " -r tagsrelease - a release number that refers to PLDISTROTAGS - defaults to HEAD"
echo " -s svnpath - where to fetch the build module"
- echo " -x testsvnpath - defaults to $DEFAULT_TESTSVNPATH"
echo " -c testconfig - defaults to $DEFAULT_TESTCONFIG"
echo " -w webpath - defaults to $DEFAULT_WEBPATH"
echo " -m mailto - no default"
t) PLDISTROTAGS=$OPTARG ;;
r) TAGSRELEASE=$OPTARG ;;
s) SVNPATH=$OPTARG ;;
- x) TESTSVNPATH=$OPTARG ;;
c) TESTCONFIG="$TESTCONFIG $OPTARG" ;;
w) WEBPATH=$OPTARG ;;
m) MAILTO=$OPTARG ;;
[ -z "$WEBPATH" ] && WEBPATH="$DEFAULT_WEBPATH"
[ -z "$IFNAME" ] && IFNAME="$DEFAULT_IFNAME"
[ -z "$SVNPATH" ] && SVNPATH="$DEFAULT_SVNPATH"
- [ -z "$TESTSVNPATH" ] && TESTSVNPATH="$DEFAULT_TESTSVNPATH"
[ -z "$TESTCONFIG" ] && TESTCONFIG="$DEFAULT_TESTCONFIG"
[ -n "$DRY_RUN" ] && MAILTO=""
set -x
echo "XXXXXXXXXX $COMMAND: using existing vserver $BASE" $(date)
show_env
+ # start in case e.g. we just rebooted
+ vserver ${BASE} start || :
# update build
vserver ${BASE} exec svn update /build
else