From 6d0f4d878488c3db19f2f39341e5e8511dcc2d8e Mon Sep 17 00:00:00 2001 From: thierry Date: Mon, 12 Nov 2007 14:26:20 +0000 Subject: [PATCH] changing the plan - runtest gets invoked from root ctx --- scripts/nightly-build-vserver.sh | 39 +++++++++++++++++--------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/scripts/nightly-build-vserver.sh b/scripts/nightly-build-vserver.sh index 0e64f1d..39797bf 100755 --- a/scripts/nightly-build-vserver.sh +++ b/scripts/nightly-build-vserver.sh @@ -77,6 +77,8 @@ function build () { set +x } +# this was formerly run in the myplc-devel chroot but now is run in the root context, +# this is so that the .ssh config gets done manually, and once and for all function runtest () { set -x set -e @@ -86,26 +88,31 @@ function runtest () { date ### the URL to the myplc package - cd /build/RPMS/i386 + cd /vservers/$BASE/build/RPMS/i386 rpm=$(ls myplc-[0-9]*.rpm) if [ ${#rpm[@]} != 1 ] ; then - echo "Cannot locate rpm for testing" + echo "$COMMAND: Cannot locate rpm for testing" exit 1 fi url=${TESTBUILDURL}${PLDISTRO}/${BASE}/${rpm} - - cd /build - ### checkout the test material - svn co ${TESTSVNPATH} plctest + + # find the place where the plctest material was checked out + cd /build/$BASE/build/CODEBASES/PLCAPI + if [ ! -d plctest/ ] ; then + echo "$COMMAND : Cannot not locate plctest/ - exiting" + exit 1 + fi # compute test directory name on test box - testdir=plctest-${buildname} + testdir=plctest-${BASE} # rsync/push test material onto the test box ssh ${TESTBOXSSH} mkdir -p ${testdir} 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 - make install PLCHOST=${TESTBOX} + #invoke make install from build to the testbox + # looks suspicious : we'd need this *during* myplc run, not at the end + # in addition we are not in the vserver here so running make can have weird effects + # make install PLCHOST=${TESTBOX} if [ "$?" != 0 ] ; then failure @@ -282,7 +289,7 @@ function main () { cp $COMMANDPATH /vservers/${BASE}/build/ # invoke this command in the vserver for building (-T) - vserver ${BASE} exec /build/$COMMAND -T "${argv[@]}" + vserver ${BASE} exec /build/$COMMAND "${argv[@]}" # if successful (we run in set -e), publish webpath=$(echo $WEBPATH | sed -e s,@PLDISTRO@,"$PLDISTRO",g -e s,@BASE@,"$BASE",g) @@ -292,8 +299,10 @@ function main () { mkdir $webpath cp $myplcs $webpath - # invoke this command again for invoking tests - vserver ${BASE} exec /build/$COMMAND -B "${argv[@]}" + # warning : need ssh in the vserver + if [ -n "$DO_TEST" ] ; then + runtest + fi success else @@ -302,12 +311,6 @@ function main () { build fi - # need ssh in the vserver - if [ -n "$DO_TEST" ] ; then - runtest - fi - - fi } -- 2.43.0