aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rw-r--r--travis/phpunit-mysql-travis.xml3
-rw-r--r--travis/phpunit-postgres-travis.xml3
-rwxr-xr-xtravis/setup-php-extensions.sh56
3 files changed, 60 insertions, 2 deletions
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
index e99f8d6cee..5fa6c06e46 100644
--- a/travis/phpunit-mysql-travis.xml
+++ b/travis/phpunit-mysql-travis.xml
@@ -32,12 +32,13 @@
</groups>
<php>
- <server name="PHPBB_TEST_DBMS" value="mysqli" />
+ <server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mysqli" />
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
<server name="PHPBB_TEST_DBPORT" value="3306" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="root" />
<server name="PHPBB_TEST_DBPASSWD" value="" />
+ <server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
index aa829f4d30..88d9e0f46a 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -31,12 +31,13 @@
<php>
<!-- "Real" test database -->
<!-- uncomment, otherwise sqlite memory runs -->
- <server name="PHPBB_TEST_DBMS" value="postgres"/>
+ <server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\postgres"/>
<server name="PHPBB_TEST_DBHOST" value="localhost" />
<server name="PHPBB_TEST_DBPORT" value="5432" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="postgres" />
<server name="PHPBB_TEST_DBPASSWD" value="" />
+ <server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
new file mode 100755
index 0000000000..86e3aaae47
--- /dev/null
+++ b/travis/setup-php-extensions.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# @copyright (c) 2013 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+set -x
+
+function find_php_ini
+{
+ echo $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||")
+}
+
+# $1 - PHP extension name
+# $2 - PHP ini file path
+function register_php_extension
+{
+ echo "extension=$1.so" >> "$2"
+}
+
+# $1 - PHP extension name
+# $2 - PHP ini file path
+function install_php_extension
+{
+ echo "Installing $1 PHP extension"
+
+ # See http://www.php.net/manual/en/install.pecl.phpize.php
+ cd "$1"
+ phpize
+ ./configure
+ make
+ make install
+ cd ..
+
+ register_php_extension "$1" "$2"
+}
+
+php_ini_file=$(find_php_ini)
+
+# disable broken opcache on PHP 5.5.7 and 5.5.8
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.9', '<');"` == "1" ]
+then
+ sed -i '/opcache.so/d' "$php_ini_file"
+fi
+
+# apc
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ]
+then
+ echo 'Enabling APC PHP extension'
+ register_php_extension 'apc' "$php_ini_file"
+ echo 'apc.enable_cli=1' >> "$php_ini_file"
+fi
+
+# redis
+git clone git://github.com/nicolasff/phpredis.git redis
+install_php_extension 'redis' "$php_ini_file"