Skip to content

Commit 12524d9

Browse files
authored
Merge pull request nextcloud#53417 from nextcloud/fix/fix-32bits-phpunit
fix(tests): Fix 32bits PHPUnit tests
2 parents 1559092 + b1f6283 commit 12524d9

15 files changed

Lines changed: 41 additions & 29 deletions

.github/workflows/object-storage-azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
cp tests/redis.config.php config/
100100
cp tests/preseed-config.php config/config.php
101101
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
102-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
102+
php -f tests/enable_all.php
103103
104104
- name: PHPUnit
105105
env:

.github/workflows/object-storage-s3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
cp tests/redis.config.php config/
101101
cp tests/preseed-config.php config/config.php
102102
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
103-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
103+
php -f tests/enable_all.php
104104
105105
- name: Wait for S3
106106
run: |

.github/workflows/object-storage-swift.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
cp tests/redis.config.php config/
9797
cp tests/preseed-config.php config/config.php
9898
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
99-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
99+
php -f tests/enable_all.php
100100
101101
- name: PHPUnit
102102
env:

.github/workflows/phpunit-32bits.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
paths:
88
- 'version.php'
99
- '.github/workflows/phpunit-32bits.yml'
10+
- 'tests/phpunit-autotest.xml'
1011
workflow_dispatch:
1112
schedule:
1213
- cron: "15 1 * * 1-6"
@@ -47,22 +48,24 @@ jobs:
4748
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a #v2.33.0
4849
with:
4950
php-version: ${{ matrix.php-versions }}
50-
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, openssl, pdo_sqlite, posix, sqlite, xml, zip, apcu
51+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, imagick, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite, apcu, ldap
5152
coverage: none
5253
ini-file: development
5354
ini-values:
5455
apc.enabled=on, apc.enable_cli=on, disable_functions= # https://github.com/shivammathur/setup-php/discussions/573
5556
env:
5657
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5758

59+
- name: Set up dependencies
60+
run: composer i
61+
5862
- name: Set up Nextcloud
5963
env:
6064
DB_PORT: 4444
6165
run: |
62-
composer install
6366
mkdir data
6467
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin
65-
php -f index.php
68+
php -f tests/enable_all.php
6669
6770
- name: PHPUnit
6871
run: composer run test -- --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness

.github/workflows/phpunit-mariadb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
cp tests/redis.config.php config/
123123
cp tests/preseed-config.php config/config.php
124124
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
125-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
125+
php -f tests/enable_all.php
126126
127127
- name: PHPUnit
128128
run: composer run test:db -- --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.db.xml' || '' }}

.github/workflows/phpunit-memcached.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
mkdir data
9797
cp tests/preseed-config.php config/config.php
9898
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
99-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
99+
php -f tests/enable_all.php
100100
101101
- name: PHPUnit memcached tests
102102
run: composer run test -- --group Memcache,Memcached --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}

.github/workflows/phpunit-mysql-sharding.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
cp tests/redis.config.php config/
155155
cp tests/preseed-config.php config/config.php
156156
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
157-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
157+
php -f tests/enable_all.php
158158
159159
- name: PHPUnit
160160
run: composer run test:db -- --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.db.xml' || '' }}

.github/workflows/phpunit-mysql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
cp tests/redis.config.php config/
123123
cp tests/preseed-config.php config/config.php
124124
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
125-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
125+
php -f tests/enable_all.php
126126
127127
- name: PHPUnit
128128
run: composer run test:db -- --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.db.xml' || '' }}

.github/workflows/phpunit-nodb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
cp tests/redis.config.php config/
103103
cp tests/preseed-config.php config/config.php
104104
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
105-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
105+
php -f tests/enable_all.php
106106
107107
- name: PHPUnit nodb testsuite
108108
run: composer run test -- --exclude-group DB,SLOWDB --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.nodb.xml' || '' }}

.github/workflows/phpunit-object-store-primary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
cp tests/redis.config.php config/
9696
cp tests/preseed-config.php config/config.php
9797
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
98-
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
98+
php -f tests/enable_all.php
9999
100100
- name: Wait for S3
101101
run: |

0 commit comments

Comments
 (0)