[Fusionforge-commits] FusionForge branch master updated. 7c574a73a4cd7a1805ea22efe2c2e63ddfbf617f

Roland Mas lolando at fusionforge.org
Tue Dec 17 17:09:07 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  7c574a73a4cd7a1805ea22efe2c2e63ddfbf617f (commit)
       via  8ff07e23c7c323c8d864df640efcabb4b1f0d6c8 (commit)
       via  4433dc0e3ec6bf074b252aa1a1a32128d5883d0b (commit)
      from  155c8780aa0ed434342340623a28ffef59725467 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7c574a73a4cd7a1805ea22efe2c2e63ddfbf617f
Merge: 155c878 8ff07e2
Author: Roland Mas <lolando at debian.org>
Date:   Tue Dec 17 17:08:15 2013 +0100

    Merged from 5.2: Allow switching distro for buildbot

diff --cc tests/scripts/fusionforge-build-and-test-deb.sh
index 73995ae,1f3ae13..36ebcc9
--- a/tests/scripts/fusionforge-build-and-test-deb.sh
+++ b/tests/scripts/fusionforge-build-and-test-deb.sh
@@@ -7,12 -9,22 +7,24 @@@ set -
  get_config
  
  export FORGE_HOME=/usr/share/gforge
- export DIST=wheezy
  export HOST=$1
- #export FILTER="func/PluginsMediawiki/mediawikiTest.php"
+ case $HOST in
+     debian7.local)
+ 	export DIST=wheezy
+ 	VMTEMPLATE=debian7
+ 	;;
+     debian8.local)
+ 	export DIST=jessie
+ 	VMTEMPLATE=debian8
+ 	;;
+     *)
+ 	export DIST=jessie
+ 	VMTEMPLATE=debian8
+ 	;;
+ esac	
+ 
 +export FILTER="DEBDebian70Tests.php"
- #export FILTER="func/PluginsMoinMoin/moinmoinTest.php"
 +
  prepare_workspace
  
  CHECKOUTPATH=$(pwd)
@@@ -68,21 -74,14 +80,21 @@@ EO
  
  reprepro -Vb $REPOPATH include $DIST $CHANGEFILE
  
 +rm ${BUILDPLACE}/${PKGNAME}_${SMAJOR}${MINOR}*
 +rm -rf $BUILDPLACE/$PKGNAME-$MAJOR
 +
 +cd $BUILDRESULT
 +cat $CHANGEFILE | sed '1,/^Checksums-Sha1:/d;/^[[:alnum:]]/,$d' | awk '{print $3}' | xargs rm
 +rm $CHANGEFILE
 +
  cd $CHECKOUTPATH
  
- destroy_vm -t debian7 $HOST
- start_vm_if_not_keeped -t debian7 $HOST
+ destroy_vm -t $VMTEMPLATE $HOST
+ start_vm_if_not_keeped -t $VMTEMPLATE $HOST
 +setup_debian_3rdparty_repo
  
 -cd $CHECKOUTPATH
  # Transfer preseeding
 -# cat tests/preseed/* | sed s/@FORGE_ADMIN_PASSWORD@/$FORGE_ADMIN_PASSWORD/ | ssh root@$HOST "LANG=C debconf-set-selections"
 +cat tests/preseed/* | sed s/@FORGE_ADMIN_PASSWORD@/$FORGE_ADMIN_PASSWORD/ | ssh root@$HOST "LANG=C debconf-set-selections"
  
  # Setup debian repo
  export DEBMIRROR DEBMIRRORSEC
@@@ -143,9 -135,42 +155,9 @@@ EO
  # Run tests
  retcode=0
  echo "Run phpunit test on $HOST in $FORGE_HOME"
 -
 -ssh root@$HOST "apt-get -y install xfonts-base vnc4server ; mkdir -p /root/.vnc"
 -ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" <<EOF
 -#! /bin/bash
 -# Setup ssh key and parameters
 -cd
 -mkdir -p .ssh
 -if ! [ -e .ssh/id_rsa.pub ] ; then
 -    ssh-keygen -f .ssh/id_rsa -N ''
 -    cat .ssh/id_rsa.pub >> .ssh/authorized_keys
 -fi
 -if ! grep -q StrictHostKeyChecking .ssh/config ; then
 -    echo StrictHostKeyChecking no >> .ssh/config
 -fi
 -
 -[ -e /var/lib/gforge/.bazaar/bazaar.conf ] && sed -i -e s,https://,http://,g /var/lib/gforge/.bazaar/bazaar.conf
 -
 -: > /root/phpunit.exitcode
 -$FORGE_HOME/tests/scripts/phpunit.sh DEBDebian70Tests.php &> /var/log/phpunit.log &
 -echo \$! > /root/phpunit.pid
 -wait %1
 -echo \$? > /root/phpunit.exitcode
 -EOF
 -ssh root@$HOST vncpasswd <<EOF
 -password
 -password
 -EOF
 -
 -ssh root@$HOST "vncserver :1"
 -sleep 5
 -pid=$(ssh root@$HOST cat /root/phpunit.pid)
 -ssh root@$HOST "tail -f /var/log/phpunit.log --pid=$pid"
 -sleep 5
 -retcode=$(ssh root@$HOST cat /root/phpunit.exitcode)
 +ssh root@$HOST "$FORGE_HOME/tests/func/vncxstartsuite.sh $FILTER"
 +retcode=$?
  rsync -av root@$HOST:/var/log/ $WORKSPACE/reports/
 -ssh root@$HOST "vncserver -kill :1" || retcode=$?
  
- stop_vm_if_not_keeped -t debian7 $@
+ stop_vm_if_not_keeped -t $VMTEMPLATE $@
  exit $retcode
diff --cc tests/scripts/fusionforge-build-and-test-src-deb.sh
index cbe677e,1326a77..17f0aab
--- a/tests/scripts/fusionforge-build-and-test-src-deb.sh
+++ b/tests/scripts/fusionforge-build-and-test-src-deb.sh
@@@ -3,17 -3,37 +3,30 @@@
  . tests/scripts/common-vm
  
  export FORGE_HOME=/opt/gforge
- export DIST=wheezy
- #export FILTER="func/PluginsMediawiki/mediawikiTest.php"
+ export HOST=$1
+ case $HOST in
+     debian7.local)
+ 	export DIST=wheezy
+ 	VMTEMPLATE=debian7
+ 	;;
+     debian8.local)
+ 	export DIST=jessie
+ 	VMTEMPLATE=debian8
+ 	;;
+     *)
+ 	export DIST=jessie
+ 	VMTEMPLATE=debian8
+ 	;;
+ esac	
+ 
 +export FILTER="DEBDebian70TestsSRC.php"
- #export FILTER="func/PluginsMoinMoin/moinmoinTest.php"
 +
  get_config $@
  prepare_workspace
- destroy_vm -t debian7 $@
- start_vm_if_not_keeped -t debian7 $@
+ destroy_vm -t $VMTEMPLATE $@
+ start_vm_if_not_keeped -t $VMTEMPLATE $@
  
 -# Build 3rd-party 
 -# make -C 3rd-party -f Makefile.deb BUILDRESULT=$BUILDRESULT LOCALREPODEB=$WORKSPACE/build/debian BUILDDIST=$DIST DEBMIRROR=$DEBMIRROR botclean botbuild
 -
 -# Setup debian repo
 -# ssh root@$HOST "echo \"deb $DEBMIRROR $DIST main\" > /etc/apt/sources.list"
 -# ssh root@$HOST "echo \"deb $DEBMIRRORSEC $DIST/updates main\" > /etc/apt/sources.list.d/security.list"
 -# ssh root@$HOST "echo \"deb file:/debian $DIST main\" >> /etc/apt/sources.list"
 -# scp -r $WORKSPACE/build/debian root@$HOST:/
 -# gpg --export --armor | ssh root@$HOST "apt-key add -"
 -# sleep 5
 +setup_debian_3rdparty_repo
  
  ssh root@$HOST "apt-get update"
  
@@@ -49,10 -68,29 +62,10 @@@ EO
  
  # Run tests
  retcode=0
 -echo "Run phpunit test on $HOST"
 -
 -ssh root@$HOST "apt-get -y install xfonts-base vnc4server ; mkdir -p /root/.vnc"
 -ssh root@$HOST "cat > /root/.vnc/xstartup ; chmod +x /root/.vnc/xstartup" <<EOF
 -#! /bin/bash
 -: > /root/phpunit.exitcode
 -$FORGE_HOME/tests/scripts/phpunit.sh DEBDebian70Tests.php &> /var/log/phpunit.log &
 -echo \$! > /root/phpunit.pid
 -wait %1
 -echo \$? > /root/phpunit.exitcode
 -EOF
 -ssh root@$HOST vncpasswd <<EOF
 -password
 -password
 -EOF
 -ssh root@$HOST "vncserver :1"
 -sleep 5
 -pid=$(ssh root@$HOST cat /root/phpunit.pid)
 -ssh root@$HOST "tail -f /var/log/phpunit.log --pid=$pid"
 -sleep 5
 -retcode=$(ssh root@$HOST cat /root/phpunit.exitcode)
 +echo "Run phpunit test on $HOST in $FORGE_HOME"
 +ssh root@$HOST "$FORGE_HOME/tests/func/vncxstartsuite.sh $FILTER"
 +retcode=$?
  rsync -av root@$HOST:/var/log/ $WORKSPACE/reports/
 -ssh root@$HOST "vncserver -kill :1" || retcode=$?
  
- stop_vm_if_not_keeped -t debian7 $@
+ stop_vm_if_not_keeped -t $VMTEMPLATE $@
 -return $retcode
 +exit $retcode

-----------------------------------------------------------------------

Summary of changes:
 tests/scripts/fusionforge-build-and-test-deb.sh    |   24 ++++++++++++++-----
 .../scripts/fusionforge-build-and-test-src-deb.sh  |   25 +++++++++++++++-----
 2 files changed, 37 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list