[Fusionforge-commits] r12639 - in trunk/tests: func func/Testing scripts

Christian Bayle cbayle at fusionforge.org
Thu Mar 10 17:10:45 CET 2011


Author: cbayle
Date: 2011-03-10 17:10:44 +0100 (Thu, 10 Mar 2011)
New Revision: 12639

Modified:
   trunk/tests/func/Testing/DEBSeleniumRemoteSuite.php
   trunk/tests/func/Testing/RPMSeleniumRemoteSuite.php
   trunk/tests/func/Testing/TarSeleniumRemoteSuite.php
   trunk/tests/func/config.php.buildbot
   trunk/tests/scripts/fusionforge-build-and-test-deb.sh
   trunk/tests/scripts/fusionforge-build-and-test-rpm.sh
   trunk/tests/scripts/fusionforge-build-and-test-source.sh
Log:
move install out of the test, to allow remote run of selenium


Modified: trunk/tests/func/Testing/DEBSeleniumRemoteSuite.php
===================================================================
--- trunk/tests/func/Testing/DEBSeleniumRemoteSuite.php	2011-03-10 15:54:31 UTC (rev 12638)
+++ trunk/tests/func/Testing/DEBSeleniumRemoteSuite.php	2011-03-10 16:10:44 UTC (rev 12639)
@@ -7,6 +7,7 @@
 	protected function setUp()
 	{
 		parent::setUp();
+/*
 
 		system("scp -r ../tests/preseed root@".HOST.":/root/");
 		system("ssh root@".HOST." 'cat /root/preseed/* | LANG=C debconf-set-selections'");
@@ -29,6 +30,7 @@
 		system("ssh root@".HOST." '(echo [core];echo use_ssl=no) > /etc/gforge/config.ini.d/zzz-builbot.ini'");
 		system("ssh root@".HOST." 'su - postgres -c \"pg_dump -Fc ".DB_NAME."\" > /root/dump'") ;
 		system("ssh root@".HOST." 'invoke-rc.d cron stop'");
+*/
 	}
 }
 ?>

Modified: trunk/tests/func/Testing/RPMSeleniumRemoteSuite.php
===================================================================
--- trunk/tests/func/Testing/RPMSeleniumRemoteSuite.php	2011-03-10 15:54:31 UTC (rev 12638)
+++ trunk/tests/func/Testing/RPMSeleniumRemoteSuite.php	2011-03-10 16:10:44 UTC (rev 12639)
@@ -8,6 +8,7 @@
 	{
 		parent::setUp();
 
+		/*
 		system("scp -r ../tests root@".HOST.":/usr/share");
 		system("scp ../tests/func/db_reload.sh root@".HOST.":/root");
 		system("ssh root@".HOST." 'ln -s gforge /usr/share/src'");
@@ -15,7 +16,6 @@
 		system("scp -rp ~/fusionforge_repo root@".HOST.":");
 		system("scp -rp ".dirname(__FILE__)."/../../../src/rpm-specific/dag-rpmforge.repo root@".HOST.":/etc/yum.repos.d/");
 
-//		system("scp -rp ".dirname(__FILE__)."/../../../src/rpm-specific/fusionforge-ci.repo root@".HOST.":/etc/yum.repos.d/");
 		if (getenv('FFORGE_RPM_REPO')) {
 			system("ssh root@".HOST." 'cd /etc/yum.repos.d/; wget ".getenv('FFORGE_RPM_REPO')."/fusionforge.repo'");
 		}
@@ -33,10 +33,8 @@
 		system("ssh root@".HOST." 'cd /usr/share/tests/func; CONFIGURED=true CONFIG_PHP=config.php.buildbot DB_NAME=".DB_NAME." php db_reload.php'");
 		system("ssh root@".HOST." 'su - postgres -c \"pg_dump -Fc ".DB_NAME."\" > /root/dump'") ;
 
-		// Install a fake sendmail to catch all outgoing emails.
-		// system("ssh root@".HOST." 'perl -spi -e s#/usr/sbin/sendmail#/usr/share/tests/scripts/catch_mail.php# /etc/gforge/local.inc'");
-
 		system("ssh root@".HOST." 'service crond stop'");
+		*/
 	}
 }
 ?>

Modified: trunk/tests/func/Testing/TarSeleniumRemoteSuite.php
===================================================================
--- trunk/tests/func/Testing/TarSeleniumRemoteSuite.php	2011-03-10 15:54:31 UTC (rev 12638)
+++ trunk/tests/func/Testing/TarSeleniumRemoteSuite.php	2011-03-10 16:10:44 UTC (rev 12639)
@@ -8,6 +8,7 @@
 	{
 		parent::setUp();
 
+		/*
 		system("scp -r ../tests root@".HOST.":/opt");
 		system("scp ../tests/func/db_reload.sh root@".HOST.":/root");
 
@@ -29,10 +30,8 @@
 		system("ssh root@".HOST." 'cd /opt/tests/func; CONFIGURED=true CONFIG_PHP=config.php.buildbot DB_NAME=".DB_NAME." php db_reload.php'");
                 system("ssh root@".HOST." 'su - postgres -c \"pg_dump -Fc ".DB_NAME."\" > /root/dump'") ;
 
-		// Install a fake sendmail to catch all outgoing emails.
-		// system("ssh root@".HOST." 'perl -spi -e s#/usr/sbin/sendmail#/opt/tests/scripts/catch_mail.php# /etc/gforge/local.inc'");
-
 		system("ssh root@".HOST." 'service crond stop'");
+		*/
 	}
 }
 ?>

Modified: trunk/tests/func/config.php.buildbot
===================================================================
--- trunk/tests/func/config.php.buildbot	2011-03-10 15:54:31 UTC (rev 12638)
+++ trunk/tests/func/config.php.buildbot	2011-03-10 16:10:44 UTC (rev 12639)
@@ -24,7 +24,7 @@
 define('DB_NAME', getenv('DB_NAME'));
 define('DB_USER', 'gforge');
 define('DB_PASSWORD', '@@FFDB_PASS@@');
-define('DB_INIT_CMD', "ssh root@".HOST." '/root/db_reload.sh ".DB_NAME." >/dev/null; touch /tmp/fusionforge-use-pfo-rbac'");
+define('DB_INIT_CMD', "ssh root@".HOST." '/root/tests/scripts/db_reload.sh ".DB_NAME." >/dev/null;'");
 
 // this should be an existing user of the forge together with its password
 // (the password should be different from 'myadmin')

Modified: trunk/tests/scripts/fusionforge-build-and-test-deb.sh
===================================================================
--- trunk/tests/scripts/fusionforge-build-and-test-deb.sh	2011-03-10 15:54:31 UTC (rev 12638)
+++ trunk/tests/scripts/fusionforge-build-and-test-deb.sh	2011-03-10 16:10:44 UTC (rev 12639)
@@ -60,6 +60,22 @@
 
 (cd tests/scripts ; ./start_vm.sh $HOST)
 scp -r tests root@$HOST:/root
+ssh root@$HOST "cat /root/tests/preseed/* | LANG=C debconf-set-selections"
+if [ "x$DEBMIRROR" != "x" ]
+then
+	ssh root@$HOST "echo \"deb $DEBMIRROR $DIST main\" > /etc/apt/sources.list"
+fi
+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
+ssh root@$HOST "apt-get update"
+ssh root@$HOST "UCF_FORCE_CONFFNEW=yes DEBIAN_FRONTEND=noninteractive LANG=C apt-get -y --force-yes install postgresql-contrib fusionforge-plugin-forumml fusionforge-full"
+ssh root@$HOST "LANG=C a2dissite default ; LANG=C invoke-rc.d apache2 reload ; LANG=C touch /tmp/fusionforge-use-pfo-rbac"
+ssh root@$HOST "(echo [core];echo use_ssl=no) > /etc/gforge/config.ini.d/zzz-builbot.ini"
+ssh root@$HOST "su - postgres -c \"pg_dump -Fc $DB_NAME\" > /root/dump"
+ssh root@$HOST "invoke-rc.d cron stop"
+
 cd tests
 phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml DEBDebian60Tests.php
 

Modified: trunk/tests/scripts/fusionforge-build-and-test-rpm.sh
===================================================================
--- trunk/tests/scripts/fusionforge-build-and-test-rpm.sh	2011-03-10 15:54:31 UTC (rev 12638)
+++ trunk/tests/scripts/fusionforge-build-and-test-rpm.sh	2011-03-10 16:10:44 UTC (rev 12639)
@@ -58,6 +58,26 @@
 
 (cd tests/scripts ; sh ./start_vm.sh $HOST)
 scp -r tests root@$HOST:/root
+ssh root@$HOST "ln -s gforge /usr/share/src"
+scp -rp ~/fusionforge_repo root@$HOST:
+scp -rp src/rpm-specific/dag-rpmforge.repo root@$HOST:/etc/yum.repos.d/
+if [ "x$FFORGE_RPM_REPO" != "x" ]
+then
+	ssh root@$HOST "cd /etc/yum.repos.d/; wget $FFORGE_RPM_REPO/fusionforge.repo"
+fi
+sleep 5
+if [ -e "/tmp/timedhosts.txt" ] 
+then
+	scp -p /tmp/timedhosts.txt root@$HOST:/var/cache/yum/timedhosts.txt
+fi
+ssh root@$HOST "yum install -y fusionforge fusionforge-plugin-scmsvn fusionforge-plugin-online_help fusionforge-plugin-extratabs fusionforge-plugin-ldapextauth fusionforge-plugin-scmgit fusionforge-plugin-blocks"
+scp -p root@$HOST:/var/cache/yum/timedhosts.txt /tmp/timedhosts.txt
+ssh root@$HOST "cd /usr/share/tests/func; CONFIGURED=true CONFIG_PHP=config.php.buildbot DB_NAME=$DB_NAME php db_reload.php"
+ssh root@$HOST "su - postgres -c \"pg_dump -Fc $DB_NAME\" > /root/dump"
+# Install a fake sendmail to catch all outgoing emails.
+# ssh root@".HOST." 'perl -spi -e s#/usr/sbin/sendmail#/usr/share/tests/scripts/catch_mail.php# /etc/gforge/local.inc'
+ssh root@$HOST "service crond stop"
+
 cd tests
 phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml RPMCentos52Tests.php
 

Modified: trunk/tests/scripts/fusionforge-build-and-test-source.sh
===================================================================
--- trunk/tests/scripts/fusionforge-build-and-test-source.sh	2011-03-10 15:54:31 UTC (rev 12638)
+++ trunk/tests/scripts/fusionforge-build-and-test-source.sh	2011-03-10 16:10:44 UTC (rev 12639)
@@ -62,6 +62,26 @@
 
 (cd tests/scripts ; ./start_vm.sh $HOST)
 scp -r tests root@$HOST:/root
+if [ "x$BUILDRESULT" != "x" ]
+then
+	scp $BUILDRESULT/fusionforge-*.tar.bz2 root@$HOST:
+else
+	scp ../build/packages/fusionforge-*.tar.bz2 root@$HOST:
+fi
+ssh root@$HOST 'tar jxf fusionforge-*.tar.bz2'
+if [ -e "/tmp/timedhosts.txt" ]
+then
+	scp -p /tmp/timedhosts.txt root@$HOST:/var/cache/yum/timedhosts.txt
+fi
+ssh root@$HOST 'cd fusionforge-*; FFORGE_RPM_REPO=http://buildbot.fusionforge.org/job/fusionforge-trunk-build-and-test-rpm/ws/build/packages/ FFORGE_DB=fforge FFORGE_USER=gforge FFORGE_ADMIN_USER=ffadmin FFORGE_ADMIN_PASSWORD=ffadmin ./install.sh centos52.local'
+scp -p root@$HOST:/var/cache/yum/timedhosts.txt /tmp/timedhosts.txt
+ssh root@$HOST "(echo [core];echo use_ssl=no) > /etc/gforge/config.ini.d/zzz-builbot.ini"
+ssh root@$HOST "cd /root/tests/func; CONFIGURED=true CONFIG_PHP=config.php.buildbot DB_NAME=$DB_NAME php db_reload.php"
+ssh root@$HOST "su - postgres -c \"pg_dump -Fc $DB_NAME\" > /root/dump"
+#  Install a fake sendmail to catch all outgoing emails.
+# ssh root@$HOST "perl -spi -e s#/usr/sbin/sendmail#/opt/tests/scripts/catch_mail.php# /etc/gforge/local.inc"
+ssh root@$HOST "service crond stop"
+
 cd tests
 phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml TarCentos52Tests.php
 




More information about the Fusionforge-commits mailing list