aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/phing-sniff.sh17
-rw-r--r--travis/phpunit-mariadb-travis.xml6
-rw-r--r--travis/phpunit-mysql-travis.xml8
-rw-r--r--travis/phpunit-postgres-travis.xml8
-rw-r--r--travis/phpunit-sqlite3-travis.xml42
-rwxr-xr-xtravis/setup-database.sh26
-rwxr-xr-xtravis/setup-phpbb.sh29
7 files changed, 124 insertions, 12 deletions
diff --git a/travis/phing-sniff.sh b/travis/phing-sniff.sh
new file mode 100755
index 0000000000..1473b99da4
--- /dev/null
+++ b/travis/phing-sniff.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# @copyright (c) 2014 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+set -x
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysql" ]
+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 1eaee5b7d8..aa245a8224 100644
--- a/travis/phpunit-mariadb-travis.xml
+++ b/travis/phpunit-mariadb-travis.xml
@@ -13,9 +13,9 @@
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>
+ <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>
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
index 5fa6c06e46..60c279d774 100644
--- a/travis/phpunit-mysql-travis.xml
+++ b/travis/phpunit-mysql-travis.xml
@@ -13,12 +13,12 @@
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>
+ <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>
+ <file>../tests/lint_test.php</file>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
index 88d9e0f46a..956278e90c 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -13,9 +13,9 @@
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>
+ <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>
@@ -29,8 +29,6 @@
</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" />
diff --git a/travis/phpunit-sqlite3-travis.xml b/travis/phpunit-sqlite3-travis.xml
new file mode 100644
index 0000000000..72b8b8c8ca
--- /dev/null
+++ b/travis/phpunit-sqlite3-travis.xml
@@ -0,0 +1,42 @@
+<?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="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/setup-database.sh b/travis/setup-database.sh
new file mode 100755
index 0000000000..c1917042cd
--- /dev/null
+++ b/travis/setup-database.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# @copyright (c) 2014 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+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" == "mysql" ]
+then
+ mysql -e 'SET GLOBAL storage_engine=MyISAM;'
+fi
+
+if [ "$DB" == "mysql" -o "$DB" == "mariadb" ]
+then
+ mysql -e 'create database IF NOT EXISTS phpbb_tests;'
+fi
diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh
new file mode 100755
index 0000000000..f079a0a6b7
--- /dev/null
+++ b/travis/setup-phpbb.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# @copyright (c) 2014 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+set -x
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+
+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
+fi
+
+cd phpBB
+php ../composer.phar install --dev --no-interaction --prefer-source
+cd ..