Skip to content

Commit ef22a02

Browse files
committed
[ticket/16659] Split up tests for each database type
PHPBB3-16659
1 parent b3e3d96 commit ef22a02

18 files changed

+789
-95
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
#
3+
# This file is part of the phpBB Forum Software package.
4+
#
5+
# @copyright (c) phpBB Limited <https://www.phpbb.com>
6+
# @license GNU General Public License, version 2 (GPL-2.0)
7+
#
8+
# For full copyright and license information, please see
9+
# the docs/CREDITS.txt file.
10+
#
11+
set -e
12+
13+
if [ ! -f doctum.phar ]; then
14+
# Download the latest (5.1.x) release if the file does not exist
15+
# Remove it to update your phar
16+
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar
17+
rm -f doctum.phar.sha256
18+
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar.sha256
19+
sha256sum --strict --check doctum.phar.sha256
20+
rm -f doctum.phar.sha256
21+
# You can fetch the latest (5.1.x) version code here:
22+
# https://doctum.long-term.support/releases/5.1/VERSION
23+
fi
24+
# Show the version to inform users of the script
25+
php doctum.phar --version
26+
php doctum.phar parse build/doctum-checkout.conf.php -v

.github/check-executable-files.sh

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
#
3+
# This file is part of the phpBB Forum Software package.
4+
#
5+
# @copyright (c) phpBB Limited <https://www.phpbb.com>
6+
# @license GNU General Public License, version 2 (GPL-2.0)
7+
#
8+
# For full copyright and license information, please see
9+
# the docs/CREDITS.txt file.
10+
#
11+
set -e
12+
13+
root="$1"
14+
path="${root}phpBB/"
15+
16+
# Check the permissions of the files
17+
18+
# The following variables MUST NOT contain any wildcard
19+
# Directories to skip
20+
directories_skipped="-path ${path}develop -o -path ${path}vendor"
21+
22+
# Files to skip
23+
files_skipped="-false"
24+
25+
# Files which have to be executable
26+
executable_files="-path ${path}bin/* -o -path ${path}install/phpbbcli.php"
27+
28+
incorrect_files=$( \
29+
find ${path} \
30+
'(' \
31+
'(' \
32+
${directories_skipped} \
33+
')' \
34+
-a -type d -prune -a -type f \
35+
')' -o \
36+
'(' \
37+
-type f -a \
38+
-not '(' \
39+
${files_skipped} \
40+
')' -a \
41+
'(' \
42+
'(' \
43+
'(' \
44+
${executable_files} \
45+
')' -a \
46+
-not -perm /100 \
47+
')' -o \
48+
'(' \
49+
-not '(' \
50+
${executable_files} \
51+
')' -a \
52+
-perm /111 \
53+
')' \
54+
')' \
55+
')' \
56+
)
57+
58+
if [ "${incorrect_files}" != '' ]
59+
then
60+
echo "The following files do not have proper permissions:";
61+
ls -la ${incorrect_files}
62+
exit 1;
63+
fi
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
#
3+
# This file is part of the phpBB Forum Software package.
4+
#
5+
# @copyright (c) phpBB Limited <https://www.phpbb.com>
6+
# @license GNU General Public License, version 2 (GPL-2.0)
7+
#
8+
# For full copyright and license information, please see
9+
# the docs/CREDITS.txt file.
10+
#
11+
set -e
12+
13+
find . -type f -a -iregex '.*\.\(gif\|jpg\|jpeg\|png\)$' -a -not -wholename '*vendor/*' | \
14+
parallel --gnu --keep-order 'phpBB/develop/strip_icc_profiles.sh {}'

.github/ldap/base.ldif

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
dn: dc=example,dc=com
2+
objectClass: top
3+
objectClass: dcObject
4+
objectClass: organization
5+
o: example
6+
dc: example
7+
8+
dn: ou=foo,dc=example,dc=com
9+
objectClass: organizationalUnit
10+
ou: foo
11+
12+
dn: cn=admin,dc=example,dc=com
13+
objectClass: simpleSecurityObject
14+
objectClass: organizationalRole
15+
cn: admin
16+
description: LDAP administrator
17+
userPassword:: e1NTSEF9NytMR2gveUxTMzdsc3RRd1V1dENZSVA0TWdYdm9SdDY=
18+
19+
dn: ou=group,dc=example,dc=com
20+
objectClass: organizationalUnit
21+
ou: group
22+
23+
dn: cn=admin,ou=foo,dc=example,dc=com
24+
objectClass: posixAccount
25+
objectClass: inetOrgPerson
26+
objectClass: organizationalPerson
27+
objectClass: person
28+
loginShell: /bin/bash
29+
homeDirectory: /home/admin
30+
uid: admin
31+
cn: admin
32+
uidNumber: 10000
33+
gidNumber: 10000
34+
sn: admin
35+
mail: admin@example.com
36+
userPassword:: e1NTSEF9WHpueGZURHZZc21JSkl6czdMVXBjdCtWYTA1dlMzVlQ=
37+
38+
dn: cn=admin,ou=group,dc=example,dc=com
39+
objectClass: posixGroup
40+
gidNumber: 10000
41+
cn: admin

.github/ldap/slapd.conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See slapd.conf(5) for details on configuration options.
2+
include /etc/ldap/schema/core.schema
3+
include /etc/ldap/schema/cosine.schema
4+
include /etc/ldap/schema/inetorgperson.schema
5+
include /etc/ldap/schema/nis.schema
6+
7+
pidfile /var/tmp/slapd/slapd.pid
8+
argsfile /var/tmp/slapd/slapd.args
9+
10+
modulepath /usr/lib/openldap
11+
12+
database ldif
13+
directory /var/tmp/slapd
14+
15+
suffix "dc=example,dc=com"
16+
rootdn "cn=admin,dc=example,dc=com"
17+
rootpw adminadmin

.github/phing-sniff.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#
3+
# This file is part of the phpBB Forum Software package.
4+
#
5+
# @copyright (c) phpBB Limited <https://www.phpbb.com>
6+
# @license GNU General Public License, version 2 (GPL-2.0)
7+
#
8+
# For full copyright and license information, please see
9+
# the docs/CREDITS.txt file.
10+
#
11+
set -e
12+
set -x
13+
14+
cd build
15+
../phpBB/vendor/bin/phing sniff
16+
cd ..

.github/phpunit-mariadb-github.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="true"
3+
backupStaticAttributes="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
verbose="true"
11+
bootstrap="../tests/bootstrap.php">
12+
<testsuites>
13+
<testsuite name="phpBB Test Suite">
14+
<directory suffix="_test.php">../tests</directory>
15+
<exclude>../tests/functional</exclude>
16+
<exclude>../tests/lint_test.php</exclude>
17+
</testsuite>
18+
<testsuite name="phpBB Functional Tests">
19+
<directory suffix="_test.php">../tests/functional</directory>
20+
</testsuite>
21+
</testsuites>
22+
23+
<groups>
24+
<exclude>
25+
<group>slow</group>
26+
</exclude>
27+
</groups>
28+
29+
<php>
30+
<server name="PHPBB_TEST_DBMS" value="mysqli" />
31+
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
32+
<server name="PHPBB_TEST_DBPORT" value="3306" />
33+
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
34+
<server name="PHPBB_TEST_DBUSER" value="root" />
35+
<server name="PHPBB_TEST_DBPASSWD" value="" />
36+
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
37+
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
38+
</php>
39+
</phpunit>

.github/phpunit-mssql-github.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="true"
3+
backupStaticAttributes="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
verbose="true"
11+
bootstrap="../tests/bootstrap.php">
12+
<testsuites>
13+
<testsuite name="phpBB Test Suite">
14+
<directory suffix="_test.php">../tests</directory>
15+
<exclude>../tests/functional</exclude>
16+
<exclude>../tests/lint_test.php</exclude>
17+
</testsuite>
18+
<testsuite name="phpBB Functional Tests">
19+
<directory suffix="_test.php">../tests/functional</directory>
20+
</testsuite>
21+
</testsuites>
22+
23+
<groups>
24+
<exclude>
25+
<group>slow</group>
26+
</exclude>
27+
</groups>
28+
29+
<php>
30+
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mssqlnative" />
31+
<server name="PHPBB_TEST_DBHOST" value="127.0.0.1" />
32+
<server name="PHPBB_TEST_DBPORT" value="" />
33+
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
34+
<server name="PHPBB_TEST_DBUSER" value="sa" />
35+
<server name="PHPBB_TEST_DBPASSWD" value="Pssw0rd_12" />
36+
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
37+
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
38+
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
39+
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
40+
</php>
41+
</phpunit>

.github/phpunit-mysql-github.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="true"
3+
backupStaticAttributes="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
verbose="true"
11+
bootstrap="../tests/bootstrap.php">
12+
<testsuites>
13+
<testsuite name="phpBB Test Suite">
14+
<directory suffix="_test.php">../tests</directory>
15+
<exclude>../tests/functional</exclude>
16+
<exclude>../tests/lint_test.php</exclude>
17+
</testsuite>
18+
<testsuite name="phpBB Functional Tests">
19+
<directory suffix="_test.php">../tests/functional</directory>
20+
</testsuite>
21+
</testsuites>
22+
23+
<groups>
24+
<exclude>
25+
<group>slow</group>
26+
</exclude>
27+
</groups>
28+
29+
<php>
30+
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mysqli" />
31+
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
32+
<server name="PHPBB_TEST_DBPORT" value="3306" />
33+
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
34+
<server name="PHPBB_TEST_DBUSER" value="root" />
35+
<server name="PHPBB_TEST_DBPASSWD" value="" />
36+
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
37+
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
38+
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
39+
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
40+
</php>
41+
</phpunit>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="true"
3+
backupStaticAttributes="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
verbose="true"
11+
bootstrap="../tests/bootstrap.php">
12+
<testsuites>
13+
<testsuite name="phpBB Test Suite">
14+
<directory suffix="_test.php">../tests</directory>
15+
<exclude>../tests/functional</exclude>
16+
<exclude>../tests/lint_test.php</exclude>
17+
</testsuite>
18+
<testsuite name="phpBB Functional Tests">
19+
<directory suffix="_test.php">../tests/functional</directory>
20+
</testsuite>
21+
</testsuites>
22+
23+
<groups>
24+
<exclude>
25+
<group>slow</group>
26+
</exclude>
27+
</groups>
28+
29+
<php>
30+
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\postgres"/>
31+
<server name="PHPBB_TEST_DBHOST" value="localhost" />
32+
<server name="PHPBB_TEST_DBPORT" value="5432" />
33+
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
34+
<server name="PHPBB_TEST_DBUSER" value="postgres" />
35+
<server name="PHPBB_TEST_DBPASSWD" value="postgres" />
36+
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
37+
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
38+
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
39+
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
40+
</php>
41+
</phpunit>

0 commit comments

Comments
 (0)