Use new testing framework, weeeeh
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# @copyright (c) 2013 phpBB Group
|
||||
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
#
|
||||
set -e
|
||||
|
||||
function add_ext_to_php_ini
|
||||
{
|
||||
echo "extension=$1.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
|
||||
}
|
||||
|
||||
# redis
|
||||
git clone git://github.com/nicolasff/phpredis.git
|
||||
cd phpredis
|
||||
phpize
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
add_ext_to_php_ini 'redis'
|
||||
@@ -1,41 +0,0 @@
|
||||
<?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>
|
||||
</testsuite>
|
||||
<testsuite name="phpBB Functional Tests">
|
||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>slow</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
|
||||
<php>
|
||||
<server name="PHPBB_TEST_DBMS" value="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_TABLE_PREFIX" value="phpbb_"/>
|
||||
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
|
||||
</php>
|
||||
</phpunit>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?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>
|
||||
</testsuite>
|
||||
<testsuite name="phpBB Functional Tests">
|
||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</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>
|
||||
@@ -1,43 +0,0 @@
|
||||
<?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>
|
||||
</testsuite>
|
||||
<testsuite name="phpBB Functional Tests">
|
||||
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>slow</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
|
||||
<php>
|
||||
<!-- "Real" test database -->
|
||||
<!-- uncomment, otherwise sqlite memory runs -->
|
||||
<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>
|
||||
</phpunit>
|
||||
24
travis/prepare-phpbb.sh
Executable file
24
travis/prepare-phpbb.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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
|
||||
EXTPATH_TEMP=$3
|
||||
|
||||
# Copy extension to a temp folder
|
||||
mkdir ../../tmp
|
||||
cp -R . ../../tmp
|
||||
cd ../../
|
||||
|
||||
# Clone phpBB
|
||||
git clone --depth=1 "git://github.com/nickvergessen/phpbb.git" "phpBB3" --branch=$BRANCH
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/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
|
||||
|
||||
# MariaDB Series
|
||||
VERSION='5.5'
|
||||
|
||||
# Operating system codename, e.g. "precise"
|
||||
OS_CODENAME=$(lsb_release --codename --short)
|
||||
|
||||
# Manually purge MySQL to remove conflicting files (e.g. /etc/mysql/my.cnf)
|
||||
sudo apt-get purge -qq mysql-common
|
||||
|
||||
if ! which add-apt-repository > /dev/null
|
||||
then
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq python-software-properties
|
||||
fi
|
||||
|
||||
MIRROR_DOMAIN='ftp.osuosl.org'
|
||||
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
|
||||
sudo add-apt-repository "deb http://$MIRROR_DOMAIN/pub/mariadb/repo/$VERSION/ubuntu $OS_CODENAME main"
|
||||
sudo apt-get update -qq
|
||||
|
||||
# Pin repository in order to avoid conflicts with MySQL from distribution
|
||||
# repository. See https://mariadb.com/kb/en/installing-mariadb-deb-files
|
||||
# section "Version Mismatch Between MariaDB and Ubuntu/Debian Repositories"
|
||||
echo "
|
||||
Package: *
|
||||
Pin: origin $MIRROR_DOMAIN
|
||||
Pin-Priority: 1000
|
||||
" | sudo tee /etc/apt/preferences.d/mariadb
|
||||
|
||||
sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password password rootpasswd"
|
||||
sudo debconf-set-selections <<< "mariadb-server-$VERSION mysql-server/root_password_again password rootpasswd"
|
||||
sudo apt-get install -qq mariadb-server
|
||||
|
||||
# Set root password to empty string.
|
||||
echo "
|
||||
USE mysql;
|
||||
UPDATE user SET Password = PASSWORD('') where User = 'root';
|
||||
FLUSH PRIVILEGES;
|
||||
" | mysql -u root -prootpasswd
|
||||
|
||||
mysql --version
|
||||
@@ -1,59 +0,0 @@
|
||||
#!/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
|
||||
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq nginx realpath
|
||||
|
||||
sudo service nginx stop
|
||||
|
||||
DIR=$(dirname "$0")
|
||||
PHPBB_ROOT_PATH=$(realpath "$DIR/../../../..")
|
||||
|
||||
NGINX_CONF="/etc/nginx/sites-enabled/default"
|
||||
|
||||
PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm"
|
||||
PHP_FPM_CONF="$DIR/php-fpm.conf"
|
||||
PHP_FPM_SOCK=$(realpath "$DIR")/php-fpm.sock
|
||||
|
||||
USER=$(whoami)
|
||||
|
||||
# php-fpm configuration
|
||||
echo "
|
||||
[global]
|
||||
|
||||
[travis]
|
||||
user = $USER
|
||||
group = $USER
|
||||
listen = $PHP_FPM_SOCK
|
||||
pm = static
|
||||
pm.max_children = 2
|
||||
|
||||
php_admin_value[memory_limit] = 128M
|
||||
" > $PHP_FPM_CONF
|
||||
|
||||
# nginx configuration
|
||||
echo "
|
||||
server {
|
||||
listen 80;
|
||||
root $PHPBB_ROOT_PATH/;
|
||||
index index.php index.html;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:$PHP_FPM_SOCK;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /app.php\$is_args\$args;
|
||||
}
|
||||
}
|
||||
" | sudo tee $NGINX_CONF > /dev/null
|
||||
|
||||
# Start daemons
|
||||
sudo $PHP_FPM_BIN --fpm-config "$DIR/php-fpm.conf"
|
||||
sudo service nginx start
|
||||
Reference in New Issue
Block a user