From a355b1dcd47a81f57b95a09f6c75c32cf8ffac77 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 11 Dec 2007 12:19:19 +0000 Subject: [PATCH] provide the about page with BASE as INIT_CWD is broken - let the test box do its own checkout --- Makefile | 9 +++++---- vbuild-nightly.sh | 41 ++++++++++++++--------------------------- 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index d53a0903..411baadb 100644 --- a/Makefile +++ b/Makefile @@ -565,7 +565,8 @@ develclean: #################### # gather build information for the 'About' page -# uses INIT_CWD to try and guess the vserver location +# when run from crontab, INIT_CWD not properly set (says /root ..) +# so, the nightly build passes NIGHTLY_BASE here myplc-release: @echo 'Creating myplc-release' rm -f $@ @@ -580,9 +581,9 @@ version-build: @echo -n 'Build bdate: ' ; date '+%Y.%m.%d' @echo -n 'Build btime: ' ; date '+%H:%M' @echo -n 'Build bhostname: ' ; hostname - @echo "Build blocation: $(INIT_CWD)" - @echo "Build blocation2: $${INIT_CWD}" - @echo -n 'Build tags file: ' ; fgrep '$$''Id' $(PLDISTROTAGS) + @echo "Build base: $(NIGHTLY_BASE)" + @echo "Build binit_cwd: $(INIT_CWD)" + @echo -n 'Build btags: ' ; fgrep '$$''Id' $(PLDISTROTAGS) @echo "Build tarch: $(HOSTARCH)" @echo "Build tdistro: $(DISTRO)" @echo "Build trelease: $(RELEASE)" diff --git a/vbuild-nightly.sh b/vbuild-nightly.sh index 3ebcab0f..5f482ca3 100755 --- a/vbuild-nightly.sh +++ b/vbuild-nightly.sh @@ -84,12 +84,12 @@ function build () { show_env echo "Running make IN $(pwd)" - make stage1=true "${MAKEOPTS[@]}" PLDISTROTAGS=${PLDISTROTAGS} PLDISTRO=${PLDISTRO} "${MAKEVARS[@]}" -C /build - # in case we use an older build that does not know about versions - set +e - make "${MAKEOPTS[@]}" PLDISTROTAGS=${PLDISTROTAGS} PLDISTRO=${PLDISTRO} "${MAKEVARS[@]}" -C /build versions - set -e - make "${MAKEOPTS[@]}" PLDISTROTAGS=${PLDISTROTAGS} PLDISTRO=${PLDISTRO} "${MAKEVARS[@]}" -C /build $MAKETARGETS + # stage1 + make -C /build "${MAKEOPTS[@]}" PLDISTROTAGS=${PLDISTROTAGS} PLDISTRO=${PLDISTRO} "${MAKEVARS[@]}" stage1=true + # versions + make -C /build "${MAKEOPTS[@]}" PLDISTROTAGS=${PLDISTROTAGS} PLDISTRO=${PLDISTRO} "${MAKEVARS[@]}" NIGHTLY_BASE=${BASE} versions + # actual stuff + make -C /build "${MAKEOPTS[@]}" PLDISTROTAGS=${PLDISTROTAGS} PLDISTRO=${PLDISTRO} "${MAKEVARS[@]}" $MAKETARGETS } @@ -113,28 +113,15 @@ function runtest () { fi url=${TESTBUILDURL}${PLDISTRO}/${BASE}/RPMS/i386/${rpm} - # checkout the system test (formerly known as plctest) - cd /vservers/${BASE}/build - rm -rf TESTS - svn export $TESTSVNPATH TESTS - # dont trust retcod - if [ ! -d TESTS ] ; then - echo "$COMMAND: could not svn export $SVNPATH - check url" - exit 1 - fi - - # compute test directory name on test box - testdir=plctest-${BASE} - # rsync/push test material onto the test box - clean first + # compute test directory name on test box + testdir=test-${BASE} + # clean it ssh ${TESTBOXSSH} rm -rf ${testdir} - ssh ${TESTBOXSSH} mkdir -p ${testdir} - rsync -a -v TESTS/ ${TESTBOXSSH}:${testdir}/ - # invoke test on testbox - ssh ${TESTBOXSSH} python -u ${testdir}/${TESTSCRIPT} ${url} - #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} + # check it out + ssh ${TESTBOXSSH} svn co ${TESTSVNPATH} ${testdir} + # invoke test on testbox + ssh 2>&1 ${TESTBOXSSH} python -u ${testdir}/${TESTSCRIPT} ${url} + # still missing - need to populate /var/www/html/install-rpms on the myplc if [ "$?" != 0 ] ; then failure -- 2.43.0