1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

780 Commits

Author SHA1 Message Date
Ilija Tovilo c809a213f2 Fix run-tests.php --no-progress flag for non-parallel testing 2022-08-12 12:51:13 +02:00
Ilija Tovilo 0028c242f0 Add --[no-]progress option to run-tests.php (#9255)
Previously, adding the -g argument would disable progress, even locally.
Now it needs to be disabled explicitly.
2022-08-11 20:58:15 +02:00
Ilija Tovilo 53e7141515 Hide skipped tests in CI (#9163) 2022-07-31 20:47:15 +02:00
Bob Weinand 1c9a49e3f1 Add opcache.preload_user=root to run-tests.php if root
This prevents breaking the testsuite when running it as root.
2022-07-30 15:57:08 +00:00
George Peter Banyard 0490f082e9 [run-tests.php] echo call performance optimization 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne 3483a1f170 [run-tests.php] Combine multiple str_replace calls to a single strtr call
Makes the replacement easier to see, neatly aligned, and only takes one function call.
This is safe because none of the combined replacement values contain tokens that would be recursively replaced.

This also improves the readability on how the regular expressions in `EXPECTF` matcher is constructed.

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
2022-07-22 11:53:46 +01:00
Ayesh Karunaratne c83a10d8db [run-tests.php] Replace backtick operator string literals with shell_exec() calls
The rationale is that `shell_exec()` is identical to the backtick operator (both of which are disabled when `shell_exec` function is disabled) makes it very clear that it is a shell execution, and eases security audits too.
2022-07-22 11:53:46 +01:00
Ayesh Karunaratne f958701dad [run-tests.php] Merge multiple unset() calls to a single call 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne 056afc8daf [run-tests.php] Minor optimizations in if blocks by placing simple expressions first 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne 51447fb47d [run-tests.php] Improve non-optimal nested if/elseif/else blocks with happy path optimizations
Simplifies and improves the readability of multiple `if`/`elseif`/`else` blocks by removing them when an earlier branch exists the execution flow by either returning or terminating the script.
2022-07-22 11:53:46 +01:00
Christoph M. Becker de6d708f63 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix --CGI-- support of run-tests.php
2022-07-20 14:42:42 +02:00
Christoph M. Becker d430652935 Fix --CGI-- support of run-tests.php
The `--CGI--` section is supposed to be just a marker, and to be empty
as such.  However, a previous refactoring[1] broke that.

[1] <https://github.com/php/php-src/commit/9140c9038a83ff55a78f357f8485de086d83d94e>

Closes GH-9061.
2022-07-20 14:41:28 +02:00
Michael Voříšek 6cd5bd1bcd Fix "%f" regex in run-tests.php (#8965)
"-.0.0" and "0." is no longer matched wrongly
2022-07-10 15:33:10 +02:00
George Peter Banyard 306f8d282d Merge branch 'PHP-8.1' 2022-06-08 11:38:16 +01:00
George Peter Banyard c05c96b3fe Fix GH-8691 Add required extensions for redirected tests 2022-06-08 11:37:07 +01:00
Rowan Tommins ed6dab2040 Avoid accessing undefined variables in run-tests.php (#8669)
The $php_cgi and $phpdbg cases here are definitely real bugs, and
caused the script to bail out under certain ini settings.

The other paths may actually be unreachable in practice, but were
highlighted by PhpStorm.
2022-06-08 00:00:03 +01:00
George Peter Banyard 8e00e8209b [ci skip] Drop ability to send QA reports by email (#8657)
This fails regularly and on top of that we don't look at these reports.
2022-06-06 20:48:38 +01:00
Ilija Tovilo 9a90bd7054 Deprecate ${} string interpolation
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-05-05 10:14:56 +02:00
Remi Collet a6d88d3b26 Merge branch 'PHP-8.1'
* PHP-8.1:
  typo
2022-03-29 10:20:53 +02:00
Remi Collet 43dd512eb6 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  typo
2022-03-29 10:20:34 +02:00
Remi Collet fe4aba6588 typo 2022-03-29 10:20:21 +02:00
Remi Collet d376630811 Merge branch 'PHP-8.1'
* PHP-8.1:
  run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n]
2022-03-29 09:55:22 +02:00
Remi Collet 85533e741a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n]
2022-03-29 09:55:04 +02:00
Remi Collet 23cce68d24 run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n] 2022-03-29 09:54:40 +02:00
Christoph M. Becker 87d9e02f01 Don't truncate subsecond precision in run-tests.php JUNIT output
When run-tests.php has been typed[1], the type of `$time` has been
chosen to be `int`.  This, however, leads to truncation, and the
somewhat relevant subsecond precision is lost.  We fix that by
changing the type to `float`, although `int|string` would be more
appropriate, but requires PHP ≥ 7.4.0.  Another option would be to
move the `number_format()` formatting into `junit_mark_test_as()`.

[1] <https://github.com/php/php-src/commit/11274f53e7fb9d669d74c23aa7883f5f04d92094>

Closes GH-7836.
2021-12-27 22:15:33 +01:00
C. Scott Ananian eebe91085d Don't test hidden files that happen to end in .phpt
This is a tiny improvement to run-tests.php which helps keep it from
tripping over hidden files, including autosave files from various
editors, metadata on certain platforms, etc.

Closes GH-7783.
2021-12-23 16:02:22 +01:00
Remi Collet b060b7ae3c Merge branch 'PHP-8.1'
* PHP-8.1:
  [ci skip] typo
  NEWS
  Fix #81520 TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php
2021-10-12 13:43:11 +02:00
Remi Collet 39e4ae0c04 [ci skip] typo 2021-10-12 13:39:24 +02:00
Remi Collet 3fb1cf24c3 Fix #81520 TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php 2021-10-12 13:34:55 +02:00
Remi Collet ea00e6501c Fix #81520 TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php 2021-10-12 13:33:16 +02:00
Nikita Popov c16f01324d Merge branch 'PHP-8.1'
* PHP-8.1:
  Add env var to disable skip cache
2021-09-29 13:05:34 +02:00
Nikita Popov 9fc6be297f Add env var to disable skip cache
DISABLE_SKIP_CACHE=1 can be used to disable the skip cache. This
does not control the extensions cache.

See https://externals.io/message/116044 for related discussion.

Closes GH-7510.
2021-09-29 13:05:25 +02:00
Kamil Tekiela 4f42a0affb Report output from CLEAN (#7456)
Mark test as borked if the test passed and CLEAN produces output.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-09-06 18:58:50 +02:00
twosee e16af8e84d Support generate lldb command in run-tests.php (#7451) 2021-09-03 09:38:07 +08:00
Nikita Popov 1015eefffe Automatically skip ext/opcache tests under --preload
Also skip observer tests, as these will observe the additional
preload file inserted by the test runner.
2021-07-30 17:26:45 +02:00
Nikita Popov 1a370d3321 Skip some tests under --preload
A genuine problem here is that we sometime get different class
casing due interaction with the ZSTR CE cache. Ignore these for
now.
2021-07-30 17:26:39 +02:00
Nikita Popov 6aa08736bb Don't unlink preload file if test failed 2021-07-27 14:36:38 +02:00
Nikita Popov bf40a933cd Add --bless option to run-tests.php
This runs bless_tests.php on all failed tests.
2021-07-16 14:39:47 +02:00
Nikita Popov 748568268a Make LDAPCONF test work on windows
Rather than using putenv(), use the ENV section. This also
required adding {PWD} support for it.
2021-06-14 10:40:18 +02:00
Nikita Popov ea126c5204 Fix EXTENSIONS for cgi tests
The extension information needs to be fetched using the cli binary,
not the cgi binary.
2021-06-11 14:42:58 +02:00
Bob Weinand 0dbbf9ec47 Merge branch 'PHP-8.0' 2021-06-04 16:29:40 +02:00
Bob Weinand c916613f13 Fix null handling in test runner when printing env 2021-06-04 16:29:14 +02:00
Bob Weinand 13d396bb59 Merge branch 'PHP-8.0' 2021-05-31 10:48:11 +02:00
Bob Weinand 76a4ea5e2a Export ENV in .sh file generated by run-tests 2021-05-31 10:47:14 +02:00
Nikita Popov ea256a218b Add %0 format to run-tests.php
This format matches against null bytes, and prevents the test
expectation from being interpreted as binary data.

bless_tests.php will automatically replace \0 with %0 as well.
2021-05-29 11:33:13 +02:00
Christoph M. Becker 6f89da78d0 Adjust run-tests.php to dynamic extension loading
PR #6787 changed the behavior of the `--EXTENSIONS--` section, so that
not yet loaded extensions are dynamically loaded if possible.  However,
when no tests are specified for the runner, only tests for already
loaded extensions are run, what defeats the purpose of the improvement
of the `--EXTENSIONS--` behavior.  We cater to that by detecting
loadable extensions, and also run their tests.
2021-05-27 11:33:36 +02:00
Nikita Popov b8e4d9f387 Use shell-free proc_open() in parallel run-tests.php 2021-05-19 20:46:50 +02:00
Michael Voříšek 3ccc0409ce Remove no longer used "log_errors_max_len" ini directive (#6838)
This is a re-application of the original match against master.
The patch was originally applied to master, then reverted from
there, incorrectly applied to PHP-8.0, reverted from there due
to ABI break, and now lands on master again. We can only hope
that it does not get reverted again ;)
2021-05-10 19:26:33 +02:00
Nikita Popov 090627048c Revert "Remove no longer used "log_errors_max_len" ini directive (#6838)"
This reverts commit d2d227e547.

This is an ABI break.
2021-05-08 20:54:53 +02:00
Ben Ramsey b5d5d06ff3 Revert "Remove no longer used "log_errors_max_len" ini directive (#6838)"
This reverts commit cc2c810dcf.
2021-05-08 13:23:58 -05:00