Skip to content

Commit 7d0f061

Browse files
committed
Add infection to testsuite, repeat JIT tests
1 parent 2813621 commit 7d0f061

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

.github/actions/test-linux/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ runs:
4141
export TEST_PHP_JUNIT=junit.out.xml
4242
export STACK_LIMIT_DEFAULTS_CHECK=1
4343
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
44+
${{ inputs.jitType == 'disable' && '' || '--repeat 2' }}
4445
-d opcache.jit=${{ inputs.jitType }} \
4546
-d opcache.protect_memory=1 \
4647
-d opcache.jit_buffer_size=64M \

.github/actions/test-macos/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ runs:
2020
export TEST_PHP_JUNIT=junit.out.xml
2121
export STACK_LIMIT_DEFAULTS_CHECK=1
2222
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
23+
${{ inputs.jitType == 'disable' && '' || '--repeat 2' }}
2324
-d opcache.jit=${{ inputs.jitType }} \
2425
-d opcache.protect_memory=1 \
2526
-d opcache.jit_buffer_size=64M \

.github/nightly_matrix.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,17 @@ function get_matrix_include(array $branches) {
4646
$jobs = [];
4747
foreach ($branches as $branch) {
4848
$jobs[] = [
49-
'name' => '_ASAN_UBSAN',
49+
'name' => '_ASAN_UBSAN_REPEAT',
5050
'branch' => $branch,
5151
'debug' => true,
5252
'zts' => true,
5353
'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'",
5454
'run_tests_parameters' => '--asan',
55-
'test_function_jit' => false,
55+
'timeout_minutes' => 3600,
56+
'test_function_jit' => true,
5657
'asan' => true,
5758
];
5859
if ($branch['ref'] !== 'PHP-8.0') {
59-
$jobs[] = [
60-
'name' => '_REPEAT',
61-
'branch' => $branch,
62-
'debug' => true,
63-
'zts' => false,
64-
'run_tests_parameters' => '--repeat 2',
65-
'timeout_minutes' => 360,
66-
'test_function_jit' => true,
67-
'asan' => false,
68-
];
6960
$jobs[] = [
7061
'name' => '_VARIATION',
7162
'branch' => $branch,

.github/workflows/nightly.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,15 @@ jobs:
397397
echo opcache.max_accelerated_files=100000 >> /etc/php.d/opcache.ini
398398
echo memory_limit=-1 >> /etc/php.d/opcache.ini
399399
php -v
400+
- name: Test Infection
401+
if: matrix.branch.ref != 'PHP-8.0'
402+
run: |
403+
git clone https://github.com/infection/infection --branch=master --depth 1
404+
cd infection
405+
git rev-parse HEAD
406+
export ASAN_OPTIONS=exitcode=139
407+
php /usr/bin/composer install --no-progress --ignore-platform-reqs
408+
php $GITHUB_WORKSPACE/.github/jit_check.php vendor/bin/phpunit || exit $?
400409
- name: Test Psalm
401410
if: matrix.branch.ref != 'PHP-8.0'
402411
run: |

ext/standard/tests/dir/bug71542.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Bug #71542 (disk_total_space does not work with relative paths)
33
--FILE--
44
<?php
5+
chdir(__DIR__);
56
$dir = basename(getcwd());
67
chdir("..");
78
var_dump(

0 commit comments

Comments
 (0)