aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/check-executable-files.sh68
-rwxr-xr-xtravis/check-image-icc-profiles.sh20
-rwxr-xr-xtravis/check-sami-parse-errors.sh33
-rwxr-xr-xtravis/ext-sniff.sh27
-rwxr-xr-xtravis/install-phpbb-test-dependencies.sh16
-rwxr-xr-xtravis/phing-sniff.sh22
-rw-r--r--travis/phpunit-mariadb-travis.xml4
-rw-r--r--travis/phpunit-mysql-travis.xml10
-rw-r--r--travis/phpunit-mysqli-travis.xml46
-rw-r--r--travis/phpunit-postgres-travis.xml9
-rw-r--r--travis/phpunit-sqlite3-travis.xml46
-rwxr-xr-xtravis/prepare-extension.sh22
-rwxr-xr-xtravis/setup-database.sh31
-rwxr-xr-xtravis/setup-exiftool.sh14
-rwxr-xr-xtravis/setup-mariadb.sh9
-rwxr-xr-xtravis/setup-php-extensions.sh59
-rwxr-xr-xtravis/setup-phpbb.sh46
-rwxr-xr-xtravis/setup-unbuffer.sh14
-rwxr-xr-xtravis/setup-webserver.sh26
19 files changed, 500 insertions, 22 deletions
diff --git a/travis/check-executable-files.sh b/travis/check-executable-files.sh
new file mode 100755
index 0000000000..4d420add1c
--- /dev/null
+++ b/travis/check-executable-files.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+root="$3"
+path="${root}phpBB/"
+
+if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ]
+then
+ # Check the permissions of the files
+
+ # The following variables MUST NOT contain any wildcard
+ # Directories to skip
+ directories_skipped="-path ${path}develop -o -path ${path}vendor"
+
+ # Files to skip
+ files_skipped="-false"
+
+ # Files which have to be executable
+ executable_files="-path ${path}bin/*"
+
+ incorrect_files=$( \
+ find ${path} \
+ '(' \
+ '(' \
+ ${directories_skipped} \
+ ')' \
+ -a -type d -prune -a -type f \
+ ')' -o \
+ '(' \
+ -type f -a \
+ -not '(' \
+ ${files_skipped} \
+ ')' -a \
+ '(' \
+ '(' \
+ '(' \
+ ${executable_files} \
+ ')' -a \
+ -not -perm +100 \
+ ')' -o \
+ '(' \
+ -not '(' \
+ ${executable_files} \
+ ')' -a \
+ -perm +111 \
+ ')' \
+ ')' \
+ ')' \
+ )
+
+ if [ "${incorrect_files}" != '' ]
+ then
+ echo "The following files do not have proper permissions:";
+ ls -la ${incorrect_files}
+ exit 1;
+ fi
+fi
diff --git a/travis/check-image-icc-profiles.sh b/travis/check-image-icc-profiles.sh
new file mode 100755
index 0000000000..5926962d40
--- /dev/null
+++ b/travis/check-image-icc-profiles.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ]
+then
+ find . -type f -a -iregex '.*\.\(gif\|jpg\|jpeg\|png\)$' -a -not -wholename '*vendor/*' | \
+ parallel --gnu --keep-order 'phpBB/develop/strip_icc_profiles.sh {}'
+fi
diff --git a/travis/check-sami-parse-errors.sh b/travis/check-sami-parse-errors.sh
new file mode 100755
index 0000000000..c3338e34db
--- /dev/null
+++ b/travis/check-sami-parse-errors.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ]
+then
+ # Workarounds for
+ # https://github.com/fabpot/Sami/issues/116
+ # and
+ # https://github.com/fabpot/Sami/issues/117
+ errors=$(
+ unbuffer phpBB/vendor/bin/sami.php parse build/sami-checkout.conf.php -v | \
+ sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | \
+ grep "ERROR: " | \
+ tee /dev/tty | \
+ wc -l
+ )
+ if [ "$errors" != "0" ]
+ then
+ exit 1
+ fi
+fi
diff --git a/travis/ext-sniff.sh b/travis/ext-sniff.sh
new file mode 100755
index 0000000000..4e557a41c1
--- /dev/null
+++ b/travis/ext-sniff.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+set -x
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+EXTNAME=$3
+
+if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ]
+then
+ phpBB/vendor/bin/phpcs \
+ -s \
+ --extensions=php \
+ --standard=build/code_sniffer/ruleset-php-extensions.xml \
+ "--ignore=phpBB/ext/$EXTNAME/tests/*" \
+ "--ignore=phpBB/ext/$EXTNAME/vendor/*" \
+ "phpBB/ext/$EXTNAME"
+fi
diff --git a/travis/install-phpbb-test-dependencies.sh b/travis/install-phpbb-test-dependencies.sh
new file mode 100755
index 0000000000..25743ff2b1
--- /dev/null
+++ b/travis/install-phpbb-test-dependencies.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+set -x
+
+cd tests
+php ../composer.phar install --dev --no-interaction --prefer-source
+cd ..
diff --git a/travis/phing-sniff.sh b/travis/phing-sniff.sh
new file mode 100755
index 0000000000..660d1764c2
--- /dev/null
+++ b/travis/phing-sniff.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+set -x
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ]
+then
+ cd build
+ ../phpBB/vendor/bin/phing sniff
+ cd ..
+fi
diff --git a/travis/phpunit-mariadb-travis.xml b/travis/phpunit-mariadb-travis.xml
index aa245a8224..53a206b9b0 100644
--- a/travis/phpunit-mariadb-travis.xml
+++ b/travis/phpunit-mariadb-travis.xml
@@ -16,10 +16,14 @@
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
+ <exclude>../tests/ui</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
</testsuite>
+ <testsuite name="phpBB UI Tests">
+ <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ </testsuite>
</testsuites>
<groups>
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
index 3ad59747ff..d0d3e3c0c0 100644
--- a/travis/phpunit-mysql-travis.xml
+++ b/travis/phpunit-mysql-travis.xml
@@ -16,13 +16,14 @@
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
- </testsuite>
- <testsuite name="phpBB Lint Test">
- <file>../tests/lint_test.php</file>
+ <exclude>../tests/ui</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
</testsuite>
+ <testsuite name="phpBB UI Tests">
+ <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ </testsuite>
</testsuites>
<groups>
@@ -32,12 +33,13 @@
</groups>
<php>
- <server name="PHPBB_TEST_DBMS" value="mysqli" />
+ <server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mysql" />
<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-mysqli-travis.xml b/travis/phpunit-mysqli-travis.xml
new file mode 100644
index 0000000000..b12ae6fe8b
--- /dev/null
+++ b/travis/phpunit-mysqli-travis.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit backupGlobals="true"
+ backupStaticAttributes="true"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="true"
+ strict="true"
+ verbose="true"
+ bootstrap="../tests/bootstrap.php">
+ <testsuites>
+ <testsuite name="phpBB Test Suite">
+ <directory suffix="_test.php">../tests</directory>
+ <exclude>../tests/functional</exclude>
+ <exclude>../tests/lint_test.php</exclude>
+ <exclude>../tests/ui</exclude>
+ </testsuite>
+ <testsuite name="phpBB Functional Tests">
+ <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
+ </testsuite>
+ <testsuite name="phpBB UI Tests">
+ <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ </testsuite>
+ </testsuites>
+
+ <groups>
+ <exclude>
+ <group>slow</group>
+ </exclude>
+ </groups>
+
+ <php>
+ <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>
+</phpunit>
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
index b4af7c5765..fa497a1264 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -16,10 +16,14 @@
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
+ <exclude>../tests/ui</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
</testsuite>
+ <testsuite name="phpBB UI Tests">
+ <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ </testsuite>
</testsuites>
<groups>
@@ -29,14 +33,13 @@
</groups>
<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/phpunit-sqlite3-travis.xml b/travis/phpunit-sqlite3-travis.xml
new file mode 100644
index 0000000000..5baab791e0
--- /dev/null
+++ b/travis/phpunit-sqlite3-travis.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit backupGlobals="true"
+ backupStaticAttributes="true"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="true"
+ strict="true"
+ verbose="true"
+ bootstrap="../tests/bootstrap.php">
+ <testsuites>
+ <testsuite name="phpBB Test Suite">
+ <directory suffix="_test.php">../tests</directory>
+ <exclude>../tests/functional</exclude>
+ <exclude>../tests/lint_test.php</exclude>
+ <exclude>../tests/ui</exclude>
+ </testsuite>
+ <testsuite name="phpBB Functional Tests">
+ <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
+ </testsuite>
+ <testsuite name="phpBB UI Tests">
+ <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ </testsuite>
+ </testsuites>
+
+ <groups>
+ <exclude>
+ <group>slow</group>
+ </exclude>
+ </groups>
+
+ <php>
+ <!--server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\sqlite3" /-->
+ <!--server name="PHPBB_TEST_DBHOST" value="../phpbb_unit_tests.sqlite3" /-->
+ <!--server name="PHPBB_TEST_DBPORT" value="" /-->
+ <!--server name="PHPBB_TEST_DBNAME" value="" /-->
+ <!--server name="PHPBB_TEST_DBUSER" value="" /-->
+ <!--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>
+</phpunit>
diff --git a/travis/prepare-extension.sh b/travis/prepare-extension.sh
new file mode 100755
index 0000000000..4518f935f8
--- /dev/null
+++ b/travis/prepare-extension.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+set -x
+
+EXTNAME=$1
+BRANCH=$2
+
+# Move the extension in place
+mkdir --parents phpBB/ext/$EXTNAME
+cp -R ../tmp/* phpBB/ext/$EXTNAME
+
+# Move the extensions travis/phpunit-*-travis.xml files in place
+cp -R travis/* phpBB/ext/$EXTNAME/travis
diff --git a/travis/setup-database.sh b/travis/setup-database.sh
new file mode 100755
index 0000000000..4ba9157d9d
--- /dev/null
+++ b/travis/setup-database.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+set -x
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+if [ "$DB" == "postgres" ]
+then
+ psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres
+ psql -c 'create database phpbb_tests;' -U postgres
+fi
+
+if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysqli" ]
+then
+ mysql -e 'SET GLOBAL storage_engine=MyISAM;'
+fi
+
+if [ "$DB" == "mysql" -o "$DB" == "mysqli" -o "$DB" == "mariadb" ]
+then
+ mysql -e 'create database IF NOT EXISTS phpbb_tests;'
+fi
diff --git a/travis/setup-exiftool.sh b/travis/setup-exiftool.sh
new file mode 100755
index 0000000000..04999b8600
--- /dev/null
+++ b/travis/setup-exiftool.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+
+sudo apt-get update
+sudo apt-get install -y parallel libimage-exiftool-perl
diff --git a/travis/setup-mariadb.sh b/travis/setup-mariadb.sh
index aceb6af7ee..9bc487915d 100755
--- a/travis/setup-mariadb.sh
+++ b/travis/setup-mariadb.sh
@@ -1,7 +1,12 @@
#!/bin/bash
#
-# @copyright (c) 2013 phpBB Group
-# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
#
set -e
set -x
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
new file mode 100755
index 0000000000..d9544858b7
--- /dev/null
+++ b/travis/setup-php-extensions.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+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)
+
+# 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"
+else
+ echo 'Disabling Opcache'
+ echo 'opcache.enable=0' >> "$php_ini_file"
+fi
+
+# redis
+# Disabled redis for now as it causes travis to fail
+# git clone git://github.com/nicolasff/phpredis.git redis
+# install_php_extension 'redis' "$php_ini_file"
diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh
new file mode 100755
index 0000000000..4daa754481
--- /dev/null
+++ b/travis/setup-phpbb.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+set -x
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ]
+then
+ travis/setup-exiftool.sh
+ travis/setup-unbuffer.sh
+fi
+
+if [ "$DB" == "mariadb" ]
+then
+ travis/setup-mariadb.sh
+fi
+
+if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]
+then
+ travis/setup-php-extensions.sh
+fi
+
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` == "1" ]
+then
+ travis/setup-webserver.sh
+ travis/install-phpbb-test-dependencies.sh
+fi
+
+cd phpBB
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.4', '<');"` == "1" ]
+then
+ php ../composer.phar config disable-tls true
+fi
+php ../composer.phar install --dev --no-interaction
+
+cd ..
diff --git a/travis/setup-unbuffer.sh b/travis/setup-unbuffer.sh
new file mode 100755
index 0000000000..4423d1b8b6
--- /dev/null
+++ b/travis/setup-unbuffer.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
+#
+set -e
+
+sudo apt-get update
+sudo apt-get install -y expect-dev
diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh
index a6086bb9f9..911ba12f3c 100755
--- a/travis/setup-webserver.sh
+++ b/travis/setup-webserver.sh
@@ -1,17 +1,16 @@
#!/bin/bash
#
-# @copyright (c) 2014 phpBB Group
-# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+# This file is part of the phpBB Forum Software package.
+#
+# @copyright (c) phpBB Limited <https://www.phpbb.com>
+# @license GNU General Public License, version 2 (GPL-2.0)
+#
+# For full copyright and license information, please see
+# the docs/CREDITS.txt file.
#
set -e
set -x
-if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
-then
- # Add PPA providing dependencies for recent HHVM on Ubuntu 12.04.
- sudo add-apt-repository -y ppa:mapnik/boost
-fi
-
sudo apt-get update
sudo apt-get install -y nginx realpath
@@ -25,11 +24,9 @@ APP_SOCK=$(realpath "$DIR")/php-app.sock
if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
then
- # Upgrade to a recent stable version of HHVM
- sudo apt-get -o Dpkg::Options::="--force-confnew" install -y hhvm-nightly
-
HHVM_LOG=$(realpath "$DIR")/hhvm.log
+ sudo service hhvm stop
sudo hhvm \
--mode daemon \
--user "$USER" \
@@ -67,8 +64,11 @@ echo "
index index.php index.html;
location ~ \.php {
- fastcgi_pass unix:$APP_SOCK;
- include fastcgi_params;
+ include fastcgi_params;
+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
+ fastcgi_param PATH_INFO \$fastcgi_path_info;
+ fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
+ fastcgi_pass unix:$APP_SOCK;
}
}
" | sudo tee $NGINX_CONF > /dev/null