[Fusionforge-commits] r12398 - trunk/tests/scripts

Christian Bayle cbayle at fusionforge.org
Sun Feb 27 14:21:18 CET 2011


Author: cbayle
Date: 2011-02-27 14:21:18 +0100 (Sun, 27 Feb 2011)
New Revision: 12398

Modified:
   trunk/tests/scripts/fusionforge-build-and-test-source.sh
Log:
make the test runnable with more param


Modified: trunk/tests/scripts/fusionforge-build-and-test-source.sh
===================================================================
--- trunk/tests/scripts/fusionforge-build-and-test-source.sh	2011-02-27 12:09:07 UTC (rev 12397)
+++ trunk/tests/scripts/fusionforge-build-and-test-source.sh	2011-02-27 13:21:18 UTC (rev 12398)
@@ -1,17 +1,42 @@
 #!/bin/sh -xe
 
+export CURDIR=`pwd`
+export WORKSPACE=${WORKSPACE:-$CURDIR}
+
 export CONFIG_PHP=func/config.php.buildbot
 export SELENIUM_RC_HOST=${SELENIUM_RC_HOST:-`hostname -i`}
 export SELENIUM_RC_DIR=$WORKSPACE/reports
-export SELENIUM_RC_URL=${HUDSON_URL}job/$JOB_NAME/ws/reports
-export HOST=centos52.local
-export VZTEMPLATE=centos-5-x86
+if [ "x${HUDSON_URL}" = "x" ]
+then
+	. tests/openvz/config.default
+	if [ -f tests/openvz/config.`hostname` ] ; then . tests/openvz/config.`hostname`; fi
+	export VEID=$VEIDCEN
+	export IPBASE=$IPCENTOSBASE
+	export IPDNS=$IPCENTOSDNS
+	ARCH=`dpkg-architecture -qDEB_BUILD_ARCH`
+	export VZTEMPLATE=centos-$CENTVERS-$ARCH-minimal
+	export VZPRIVATEDIR
+	export DIST
+	export BASEDIR=${BASEDIR:-/~`id -un`/ws}
+	export SELENIUM_RC_URL=http://`hostname -f`$BASEDIR/reports
+	export FFORGE_RPM_REPO=http://`hostname -f`$BASEDIR/build/packages
+	export HOST=centos5.local
+	export SELENIUM_RC_HOST=localhost
+	export USEVZCTL=true
+else
+	export SELENIUM_RC_URL=${HUDSON_URL}job/$JOB_NAME/ws/reports
+	export FFORGE_RPM_REPO=${HUDSON_URL}job/$JOB_NAME/ws/build/packages
+	export HOST=centos52.local
+	export VZTEMPLATE=centos-5-x86
+fi
 export DB_NAME=fforge
 export CONFIGURED=true
 
 export BUILDRESULT=$WORKSPACE/build/packages
 
-rm -fr $WORKSPACE/build/packages $WORKSPACE/reports $WORKSPACE/apidocs
+[ ! -d $WORKSPACE/build/packages ] || rm -fr $WORKSPACE/build/packages
+[ ! -d $WORKSPACE/reports ] || rm -fr $WORKSPACE/reports
+[ ! -d $WORKSPACE/apidocs ] || rm -fr $WORKSPACE/apidocs
 mkdir -p $WORKSPACE/build/packages $WORKSPACE/reports/coverage $WORKSPACE/apidocs
 
 make build-doc DOCSDIR=$WORKSPACE/apidocs DOXYGEN=$HOME/doxygen-1.6.3/bin/doxygen
@@ -27,4 +52,3 @@
 cd ..
 cp $WORKSPACE/reports/phpunit-selenium.xml $WORKSPACE/reports/phpunit-selenium.xml.org
 xalan -in $WORKSPACE/reports/phpunit-selenium.xml.org -xsl fix_phpunit.xslt -out $WORKSPACE/reports/phpunit-selenium.xml
-




More information about the Fusionforge-commits mailing list