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"
+ ### 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},")
- # compute test directory name on test box
- testdir=chroot-${BASE}
- # use another name if any config contains vserver
- echo $TESTCONFIG | grep vserver &> /dev/null && testdir=vserver-${BASE}
+ # test directory name on test box
+ testdir=${BASE}
# clean it
ssh ${TESTBOXSSH} rm -rf ${testdir}
# check it out
for config in ${TESTCONFIG} ; do
configs="$configs --config $config"
done
- [ "$PERSONALITY" == linux64 ] && personality="--personality linux64"
-
# need to proceed despite of set -e
success=true
- ssh 2>&1 ${TESTBOXSSH} ${testdir}/runtest --build ${SVNPATH} --url ${url} $configs $personality --all || success=
+ ssh 2>&1 ${TESTBOXSSH} ${testdir}/runtest --build ${SVNPATH} --url ${url} $configs --all || success=
# gather logs in the vserver
mkdir -p /vservers/$BASE/build/testlogs
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
rm -rf $WEBPATH/$BASE ; mkdir -p $WEBPATH/$BASE/{RPMS,SRPMS}
rsync --archive --delete --verbose /vservers/$BASE/build/RPMS/ $WEBPATH/$BASE/RPMS/
rsync --archive --delete --verbose /vservers/$BASE/build/SRPMS/ $WEBPATH/$BASE/SRPMS/
+ # publish myplc-release
+ rsync --verbose /vservers/$BASE/build/myplc-release $WEBPATH/$BASE
if [ -n "$DO_TEST" ] ; then
runtest