Skip to content

Commit ad34884

Browse files
committed
Add RUN_RESOURCE_HEAVY_TESTS env var
Disable resource-heavy tests by default (>1GB of memory usage), unless the RUN_RESOURCE_HEAVY_TESTS env variable is set. Fixes GH-20762
1 parent 648ad5b commit ad34884

File tree

23 files changed

+25
-6
lines changed

23 files changed

+25
-6
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ jobs:
180180
name: Test
181181
no_output_timeout: 30m
182182
command: |
183+
export RUN_RESOURCE_HEAVY_TESTS=1
183184
sapi/cli/php run-tests.php \
184185
-d zend_extension=opcache.so \
185186
-d opcache.enable_cli=1 \

.github/actions/freebsd/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ runs:
105105
export SKIP_IO_CAPTURE_TESTS=1
106106
export CI_NO_IPV6=1
107107
export STACK_LIMIT_DEFAULTS_CHECK=1
108+
export RUN_RESOURCE_HEAVY_TESTS=1
108109
sapi/cli/php run-tests.php \
109110
-P -q -j2 \
110111
-g FAIL,BORK,LEAK,XLEAK \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ runs:
2525
# Slow tests criteron is doubled because this runner isn't as fast as others
2626
export SKIP_IO_CAPTURE_TESTS=1
2727
export STACK_LIMIT_DEFAULTS_CHECK=1
28+
export RUN_RESOURCE_HEAVY_TESTS=1
2829
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
2930
-j$(nproc) \
3031
-g FAIL,BORK,LEAK,XLEAK \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ runs:
1414
export PDO_MYSQL_TEST_HOST=127.0.0.1
1515
export PDO_MYSQL_TEST_USER=root
1616
export PDO_MYSQL_TEST_PASS=root
17+
export RUN_RESOURCE_HEAVY_TESTS=1
1718
sapi/cli/php run-tests.php -P -q \
1819
-g FAIL,BORK,LEAK,XLEAK \
1920
--no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ runs:
3636
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
3737
fi
3838
export SKIP_IO_CAPTURE_TESTS=1
39+
export RUN_RESOURCE_HEAVY_TESTS=1
3940
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
4041
-d opcache.jit=${{ inputs.jitType }} \
4142
-d opcache.jit_buffer_size=16M \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ runs:
1414
set -x
1515
export SKIP_IO_CAPTURE_TESTS=1
1616
export CI_NO_IPV6=1
17+
export RUN_RESOURCE_HEAVY_TESTS=1
1718
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
1819
-d opcache.jit=${{ inputs.jitType }} \
1920
-d opcache.jit_buffer_size=16M \

Zend/tests/bug55509.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Bug #55509 (segfault on x86_64 using more than 2G memory)
33
--SKIPIF--
44
<?php
5+
if (!getenv('RUN_RESOURCE_HEAVY_TESTS')) die('skip resource-heavy test');
56
if (PHP_INT_SIZE == 4) {
67
die('skip Not for 32-bits OS');
78
}

Zend/tests/bug74093.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
33
--SKIPIF--
44
<?php
5+
if (!getenv('RUN_RESOURCE_HEAVY_TESTS')) die('skip resource-heavy test');
56
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
67
if (PHP_ZTS) die("skip only for no-zts build");
78
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip not for Windows");

Zend/tests/bug78010.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
--TEST--
22
Bug #78010: Segmentation fault during GC
3+
--SKIPIF--
4+
<?php
5+
if (!getenv('RUN_RESOURCE_HEAVY_TESTS')) die('skip resource-heavy test');
6+
if (getenv("SKIP_SLOW_TESTS")) die('skip slow test');
7+
?>
38
--INI--
49
memory_limit=2G
510
--FILE--

ext/gd/tests/bug77270.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #77270 (imagecolormatch Out Of Bounds Write on Heap)
3-
--INI--
4-
memory_limit=-1
53
--EXTENSIONS--
64
gd
75
--SKIPIF--

0 commit comments

Comments
 (0)