aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2020-05-09 01:15:08 +0200
committerMaat <maat-pub@mageia.biz>2020-05-09 01:15:08 +0200
commit6985226b17e8a0ef0a720bf1d12fe0c216e13dab (patch)
tree116d2565ac02c40abe0548863c6badf8ec3e1d1e /travis
parent8ea437e30605e0f66b5220bf904a61d7c1d11ddd (diff)
parent8d00784dfe2c8bcb10843ff70b4cfa998d703285 (diff)
downloadforums-master.tar
forums-master.tar.gz
forums-master.tar.bz2
forums-master.tar.xz
forums-master.zip
Merge remote-tracking branch 'upstream/prep-release-3.3.0'HEADmaster
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/check-executable-files.sh4
-rwxr-xr-xtravis/ext-sniff.sh5
-rw-r--r--travis/ldap/base.ldif41
-rw-r--r--travis/ldap/slapd.conf17
-rw-r--r--travis/phpunit-mariadb-travis.xml8
-rw-r--r--travis/phpunit-mysql-travis.xml46
-rw-r--r--travis/phpunit-mysqli-travis.xml9
-rw-r--r--travis/phpunit-postgres-travis.xml9
-rw-r--r--travis/phpunit-sqlite3-travis.xml9
-rwxr-xr-xtravis/setup-database.sh4
-rwxr-xr-xtravis/setup-ldap.sh23
-rwxr-xr-xtravis/setup-mariadb.sh5
-rwxr-xr-xtravis/setup-php-extensions.sh13
13 files changed, 109 insertions, 84 deletions
diff --git a/travis/check-executable-files.sh b/travis/check-executable-files.sh
index 1aa8dca073..6899373c1e 100755
--- a/travis/check-executable-files.sh
+++ b/travis/check-executable-files.sh
@@ -48,13 +48,13 @@ then
'(' \
${executable_files} \
')' -a \
- -not -perm +100 \
+ -not -perm /100 \
')' -o \
'(' \
-not '(' \
${executable_files} \
')' -a \
- -perm +111 \
+ -perm /111 \
')' \
')' \
')' \
diff --git a/travis/ext-sniff.sh b/travis/ext-sniff.sh
index ca4d2115ba..f346ba6c25 100755
--- a/travis/ext-sniff.sh
+++ b/travis/ext-sniff.sh
@@ -22,7 +22,6 @@ then
-s \
--extensions=php \
--standard=build/code_sniffer/ruleset-php-extensions.xml \
- "--ignore=phpBB/ext/$EXTNAME/tests/*" \
- "--ignore=phpBB/ext/$EXTNAME/vendor/*" \
- "phpBB/ext/$EXTNAME"
+ --ignore=*/"$EXTNAME"/tests/*,*/"$EXTNAME"/vendor/* \
+ phpBB/ext/"$EXTNAME"
fi
diff --git a/travis/ldap/base.ldif b/travis/ldap/base.ldif
new file mode 100644
index 0000000000..09fe7cecc6
--- /dev/null
+++ b/travis/ldap/base.ldif
@@ -0,0 +1,41 @@
+dn: dc=example,dc=com
+objectClass: top
+objectClass: dcObject
+objectClass: organization
+o: example
+dc: example
+
+dn: ou=foo,dc=example,dc=com
+objectClass: organizationalUnit
+ou: foo
+
+dn: cn=admin,dc=example,dc=com
+objectClass: simpleSecurityObject
+objectClass: organizationalRole
+cn: admin
+description: LDAP administrator
+userPassword:: e1NTSEF9NytMR2gveUxTMzdsc3RRd1V1dENZSVA0TWdYdm9SdDY=
+
+dn: ou=group,dc=example,dc=com
+objectClass: organizationalUnit
+ou: group
+
+dn: cn=admin,ou=foo,dc=example,dc=com
+objectClass: posixAccount
+objectClass: inetOrgPerson
+objectClass: organizationalPerson
+objectClass: person
+loginShell: /bin/bash
+homeDirectory: /home/admin
+uid: admin
+cn: admin
+uidNumber: 10000
+gidNumber: 10000
+sn: admin
+mail: admin@example.com
+userPassword:: e1NTSEF9WHpueGZURHZZc21JSkl6czdMVXBjdCtWYTA1dlMzVlQ=
+
+dn: cn=admin,ou=group,dc=example,dc=com
+objectClass: posixGroup
+gidNumber: 10000
+cn: admin
diff --git a/travis/ldap/slapd.conf b/travis/ldap/slapd.conf
new file mode 100644
index 0000000000..5fce95cee2
--- /dev/null
+++ b/travis/ldap/slapd.conf
@@ -0,0 +1,17 @@
+# See slapd.conf(5) for details on configuration options.
+include /etc/ldap/schema/core.schema
+include /etc/ldap/schema/cosine.schema
+include /etc/ldap/schema/inetorgperson.schema
+include /etc/ldap/schema/nis.schema
+
+pidfile /tmp/slapd/slapd.pid
+argsfile /tmp/slapd/slapd.args
+
+modulepath /usr/lib/openldap
+
+database ldif
+directory /tmp/slapd
+
+suffix "dc=example,dc=com"
+rootdn "cn=admin,dc=example,dc=com"
+rootpw adminadmin
diff --git a/travis/phpunit-mariadb-travis.xml b/travis/phpunit-mariadb-travis.xml
index 53a206b9b0..35ade72d4e 100644
--- a/travis/phpunit-mariadb-travis.xml
+++ b/travis/phpunit-mariadb-travis.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
- backupStaticAttributes="true"
+ backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
@@ -19,10 +17,10 @@
<exclude>../tests/ui</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
+ <directory suffix="_test.php">../tests/functional</directory>
</testsuite>
<testsuite name="phpBB UI Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ <directory suffix="_test.php">../tests/ui</directory>
</testsuite>
</testsuites>
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
deleted file mode 100644
index d0d3e3c0c0..0000000000
--- a/travis/phpunit-mysql-travis.xml
+++ /dev/null
@@ -1,46 +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>
- <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\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>
-</phpunit>
diff --git a/travis/phpunit-mysqli-travis.xml b/travis/phpunit-mysqli-travis.xml
index b12ae6fe8b..0f064ab996 100644
--- a/travis/phpunit-mysqli-travis.xml
+++ b/travis/phpunit-mysqli-travis.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
- backupStaticAttributes="true"
+ backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
@@ -19,10 +17,10 @@
<exclude>../tests/ui</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
+ <directory suffix="_test.php">../tests/functional</directory>
</testsuite>
<testsuite name="phpBB UI Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ <directory suffix="_test.php">../tests/ui</directory>
</testsuite>
</testsuites>
@@ -40,6 +38,7 @@
<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_MEMCACHED_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 fa497a1264..f9b8a6f595 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
- backupStaticAttributes="true"
+ backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
@@ -19,10 +17,10 @@
<exclude>../tests/ui</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
+ <directory suffix="_test.php">../tests/functional</directory>
</testsuite>
<testsuite name="phpBB UI Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ <directory suffix="_test.php">../tests/ui</directory>
</testsuite>
</testsuites>
@@ -40,6 +38,7 @@
<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_MEMCACHED_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
index 5baab791e0..1b1fa24e7d 100644
--- a/travis/phpunit-sqlite3-travis.xml
+++ b/travis/phpunit-sqlite3-travis.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
- backupStaticAttributes="true"
+ backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="true"
- strict="true"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
@@ -19,10 +17,10 @@
<exclude>../tests/ui</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory>
+ <directory suffix="_test.php">../tests/functional</directory>
</testsuite>
<testsuite name="phpBB UI Tests">
- <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/ui</directory>
+ <directory suffix="_test.php">../tests/ui</directory>
</testsuite>
</testsuites>
@@ -40,6 +38,7 @@
<!--server name="PHPBB_TEST_DBUSER" value="" /-->
<!--server name="PHPBB_TEST_DBPASSWD" value="" /-->
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
+ <server name="PHPBB_TEST_MEMCACHED_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-database.sh b/travis/setup-database.sh
index 3771f19073..b581ddfccb 100755
--- a/travis/setup-database.sh
+++ b/travis/setup-database.sh
@@ -26,12 +26,12 @@ then
psql -c 'create database phpbb_tests;' -U postgres
fi
-if [ "$TRAVIS_PHP_VERSION" == "5.4" -a "$DB" == "mysqli" ]
+if [ "$TRAVIS_PHP_VERSION" == "5.6" -a "$DB" == "mysqli" ]
then
mysql -e 'SET GLOBAL storage_engine=MyISAM;'
fi
-if [ "$DB" == "mysql" -o "$DB" == "mysqli" -o "$DB" == "mariadb" ]
+if [ "$DB" == "mysqli" -o "$DB" == "mariadb" ]
then
mysql -e 'create database IF NOT EXISTS phpbb_tests;'
fi
diff --git a/travis/setup-ldap.sh b/travis/setup-ldap.sh
new file mode 100755
index 0000000000..9be816d77d
--- /dev/null
+++ b/travis/setup-ldap.sh
@@ -0,0 +1,23 @@
+#!/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
+
+SLOWTESTS=$1
+
+if [ "$SLOWTESTS" == '1' ]
+then
+ sudo apt-get -y install ldap-utils slapd php-ldap
+ mkdir /tmp/slapd
+ slapd -f travis/ldap/slapd.conf -h ldap://localhost:3389 &
+ sleep 3
+ ldapadd -h localhost:3389 -D "cn=admin,dc=example,dc=com" -w adminadmin -f travis/ldap/base.ldif
+fi
diff --git a/travis/setup-mariadb.sh b/travis/setup-mariadb.sh
index 95445dcc55..2efe99cc2d 100755
--- a/travis/setup-mariadb.sh
+++ b/travis/setup-mariadb.sh
@@ -12,13 +12,14 @@ set -e
set -x
# MariaDB Series
-VERSION='10.0'
+VERSION='10.1'
# 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 -y mysql-common
+sudo rm -rf /etc/mysql && sudo rm -rf /var/log/mysql && sudo rm -rf /var/lib/mysql && sudo rm -rf /var/lib/mysql-files && sudo rm -rf /var/lib/mysql-keyring
if ! which add-apt-repository > /dev/null
then
@@ -27,7 +28,7 @@ then
fi
MIRROR_DOMAIN='ftp.osuosl.org'
-sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
+sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
sudo add-apt-repository "deb http://$MIRROR_DOMAIN/pub/mariadb/repo/$VERSION/ubuntu $OS_CODENAME main"
sudo apt-get update
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
index a69468a637..0fcddb044f 100755
--- a/travis/setup-php-extensions.sh
+++ b/travis/setup-php-extensions.sh
@@ -42,14 +42,6 @@ function install_php_extension
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'
- printf "\n" | pecl install apc
- echo 'apc.enable_cli=1' >> "$php_ini_file"
-fi
-
# APCu
if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ]
then
@@ -63,7 +55,10 @@ then
fi
# Disable xdebug on travis
-phpenv config-rm xdebug.ini
+phpenv config-rm xdebug.ini || true
+
+# memcached
+register_php_extension memcached "$php_ini_file"
# redis
# Disabled redis for now as it causes travis to fail