[Fusionforge-commits] FusionForge branch Branch_5_3 updated. f0b1183e7ee1542caaea2a88a318ead38ea4c0b7

Roland Mas lolando at fusionforge.org
Tue May 6 10:38:09 CEST 2014


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, Branch_5_3 has been updated
       via  f0b1183e7ee1542caaea2a88a318ead38ea4c0b7 (commit)
       via  6ada4d369fe7e36ce4bbfbccbe996328f0184f57 (commit)
       via  38c72b6dae711caf3369d64c78187f36425e9dbe (commit)
      from  79c4457b67f75a4a7ab22168c3095d15fbb13526 (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 f0b1183e7ee1542caaea2a88a318ead38ea4c0b7
Author: Roland Mas <lolando at debian.org>
Date:   Fri Apr 25 16:23:04 2014 +0200

    Backport from master: Refresh nscd before creating the homedirs

diff --git a/tests/func/PluginsScmSvn/svnSSHTest.php b/tests/func/PluginsScmSvn/svnSSHTest.php
index 7d3073b..36b0f8b 100644
--- a/tests/func/PluginsScmSvn/svnSSHTest.php
+++ b/tests/func/PluginsScmSvn/svnSSHTest.php
@@ -40,10 +40,10 @@ class ScmSvnSSHTest extends FForge_SeleniumTestCase
 		$this->uploadSshKey();
 	    
 		// Run the cronjob to create repositories
+		$this->reload_nscd();
 		$this->cron("create_scm_repos.php");
 		$this->cron("homedirs.php");
 		$this->cron("ssh_create.php");
-		$this->reload_nscd();
 
 		// Get the address of the repo
 		$this->open(ROOT);

commit 6ada4d369fe7e36ce4bbfbccbe996328f0184f57
Author: Roland Mas <lolando at debian.org>
Date:   Fri Apr 25 13:47:11 2014 +0200

    Backport from master: Refresh nscd at the start of each test run

diff --git a/tests/func/Testing/SeleniumGforge.php b/tests/func/Testing/SeleniumGforge.php
index bcce562..c3e277b 100644
--- a/tests/func/Testing/SeleniumGforge.php
+++ b/tests/func/Testing/SeleniumGforge.php
@@ -63,6 +63,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 			// Reload a fresh database before running this test suite.
 			system(DB_INIT_CMD);
 		}
+		$this->reload_nscd();
 
 		$this->setBrowser('*firefox');
 		$this->setBrowserUrl(URL);

commit 38c72b6dae711caf3369d64c78187f36425e9dbe
Author: Roland Mas <lolando at debian.org>
Date:   Fri Apr 25 13:02:34 2014 +0200

    Backport from master: New testsuite methods to reload Apache and (u)nscd
    
    Conflicts:
    	tests/func/Testing/SeleniumGforge.php

diff --git a/tests/func/Testing/SeleniumGforge.php b/tests/func/Testing/SeleniumGforge.php
index cc9621a..bcce562 100644
--- a/tests/func/Testing/SeleniumGforge.php
+++ b/tests/func/Testing/SeleniumGforge.php
@@ -102,7 +102,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 
 	protected function runCommand($cmd)
 	{
-		system($cmd, $ret);
+		system(RUN_COMMAND_PREFIX.$cmd);
                 $this->assertEquals($ret, 0);
 	}
 
@@ -121,6 +121,18 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 		$this->runCommand(RUN_JOB_PATH."forge_run_plugin_job $plugin $cmd");
 	}
 
+	protected function reload_apache()
+	{
+		$this->runCommand("service apache2 reload > /dev/null 2>&1 || service httpd reload > /dev/null 2>&1");
+		sleep (3); // Give it some time to become available again
+	}
+
+	protected function reload_nscd()
+	{
+		$this->runCommand("service unscd restart > /dev/null 2>&1 || service nscd restart > /dev/null 2>&1");
+		sleep (1); // Give it some time to wake up
+	}
+
 	protected function init() {
 		$this->createAndGoto('ProjectA');
 	}
diff --git a/tests/scripts/phpunit.sh b/tests/scripts/phpunit.sh
index e15337c..d9c2763 100755
--- a/tests/scripts/phpunit.sh
+++ b/tests/scripts/phpunit.sh
@@ -46,6 +46,9 @@ define('DB_USER', getenv('DB_USER'));
 define('DB_PASSWORD', '@@FFDB_PASS@@');
 define('DB_INIT_CMD', "$FORGE_HOME/tests/func/db_reload.sh >>/var/log/db_reload_selenium.log 2>&1");
 
+// Prefix for commands to run
+define('RUN_COMMAND_PREFIX', '');
+
 // Cronjob wrapper script location
 print "Looking for forge_run_job script...\n";
 if (is_executable ("$FORGE_HOME/bin/forge_run_job")) {

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

Summary of changes:
 tests/func/PluginsScmSvn/svnSSHTest.php |    2 +-
 tests/func/Testing/SeleniumGforge.php   |   15 ++++++++++++++-
 tests/scripts/phpunit.sh                |    3 +++
 3 files changed, 18 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list