X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vbuild-nightly.sh;h=ef3582e5d308c3ffdcff82437f78c5323a4a19a2;hb=f1ad601754cc0d9e8db7a4e943f64603ce8961eb;hp=1207487043343a9e76ee45f33670c23dbe54b30f;hpb=ba5cc6adfbad0582d3462b897ddc99ab253a0c37;p=build.git diff --git a/vbuild-nightly.sh b/vbuild-nightly.sh index 12074870..ef3582e5 100755 --- a/vbuild-nightly.sh +++ b/vbuild-nightly.sh @@ -10,7 +10,7 @@ DEFAULT_PLDISTRO=planetlab 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 @@ -151,6 +151,8 @@ function build () { 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 @@ -165,21 +167,39 @@ function runtest () { 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/ 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 @@ -188,11 +208,11 @@ function runtest () { # 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/ @@ -238,7 +258,6 @@ function usage () { 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" @@ -271,7 +290,6 @@ function main () { t) PLDISTROTAGS=$OPTARG ;; r) TAGSRELEASE=$OPTARG ;; s) SVNPATH=$OPTARG ;; - x) TESTSVNPATH=$OPTARG ;; c) TESTCONFIG="$TESTCONFIG $OPTARG" ;; w) WEBPATH=$OPTARG ;; m) MAILTO=$OPTARG ;; @@ -303,7 +321,6 @@ function main () { [ -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=""