Commit graph

803 commits

Author SHA1 Message Date
Ilija Tovilo
58712e0698
Retry tests on deadlock
Closes GH-12693
2023-11-16 16:02:20 +01:00
Ilija Tovilo
6d59640980
Automatically mark tests as flaky
Marking all of these tests as flaky is annoying, so attempt to recognize them
automatically.

Closes GH-12638
2023-11-15 13:21:58 +01:00
Ilija Tovilo
936538d8d7
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Increase run-tests.php timeout for asan
2023-08-30 23:10:10 +02:00
Ilija Tovilo
f4a6a6d096
Increase run-tests.php timeout for asan
Closes GH-12087
2023-08-30 23:09:33 +02:00
Ilija Tovilo
d5f7ffb914
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Make unrepeatable tests retriable
2023-08-29 13:58:53 +02:00
Ilija Tovilo
f2c16b7ba3
Make unrepeatable tests retriable
This was an error in thinking on my side. The reason these tests are
unrepeatable is because --repeat executes the same request in the same process,
and does not run the CLEAN section in between runs. This is not the case when
retrying tests.

We could potentially make CLEAN tests repeatable by including the CLEAN section
in the tested script. This does however not work for all tests (e.g. tests that
set open_basedir).

Closes GH-12072
2023-08-29 13:56:13 +02:00
Ilija Tovilo
4e3d9b26f9
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Implement flaky test section
2023-07-06 09:46:03 +02:00
Ilija Tovilo
849fdcae7d
Implement flaky test section
This re-uses the already used for automatic retesting. That's certainly better
than XFAIL.

Closes GH-11325
2023-07-06 09:45:35 +02:00
Ilija Tovilo
f735543bc9
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Add more patterns to run-tests.php retry list
2023-05-27 19:21:55 +02:00
Ilija Tovilo
f249958cd3
[skip ci] Add more patterns to run-tests.php retry list
CURL: 404: Page Not Found
IMAP: Can't create a temporary mailbox: [ALREADYEXISTS] Mailbox already exists
Sockets: socket_bind(): Unable to bind address [98]: Address already in use
2023-05-27 19:21:19 +02:00
Ilija Tovilo
81b2d2ee45
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add retry mechanism in run-tests.php
2023-05-03 13:50:04 +02:00
Ilija Tovilo
11597d18d6
Add retry mechanism in run-tests.php
We have lots of spurious failures in CI, many of them with the "all" CONFLICT.
We're limiting the retrying to specific error messages. In the future we may
also provide a FLAKY section to retry specific tests.

Closes GH-10892
2023-05-03 13:47:13 +02:00
Ilija Tovilo
6343975f34
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Another attempt to fix MSAN nightly on master
2023-03-15 23:38:09 +01:00
Ilija Tovilo
471105abd7
Another attempt to fix MSAN nightly on master 2023-03-15 23:37:36 +01:00
Ilija Tovilo
ca7c7e9c05
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  use_tls=0 on MSAN
2023-03-14 17:43:02 +01:00
Ilija Tovilo
63525ee600
use_tls=0 on MSAN
Attempt to fix MSAN failure in CI

Closes GH-10851
2023-03-14 17:42:23 +01:00
Ilija Tovilo
d3c9585204
[skip ci] Fix diff cmd env name in run-tests.php 2023-03-10 01:10:25 +01:00
Arnaud Le Blanc
61048f984a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix run-tests.php hanging when a worker process dies without notice (#9931)
2023-01-13 18:07:45 +01:00
Arnaud Le Blanc
8c0698f66b
Fix run-tests.php hanging when a worker process dies without notice (#9931)
run-tests.php with `-jN` can hang if a parallel worker dies without notice. This
can happen due to fatal errors in the worker, or if the worker is killed.

- run-tests.php (main process)
  \_ run-tests.php (worker #0) // main process hangs if this one crashes
     \_ test-001.php (test-001.phpt)
2023-01-13 17:43:17 +01:00
Ilija Tovilo
b08901b63f
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Migrate i386 to GitHub actions
2022-11-03 14:37:59 +01:00
Ilija Tovilo
ed1e703716
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Migrate i386 to GitHub actions
2022-11-03 14:37:17 +01:00
Ilija Tovilo
75970077b0
Migrate i386 to GitHub actions
Closes GH-9856
2022-11-03 14:34:54 +01:00
Derick Rethans
d7d6794f94 Use external diff tool if TEST_PHP_DIFF_CMD env var is set 2022-09-19 14:43:16 +01:00
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] <9140c9038a>

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] <11274f53e7>

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