1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Automatically skip tty tests if not on tty

See GH-19975
Closes GH-20013
This commit is contained in:
Ilija Tovilo
2025-09-30 16:35:52 +02:00
parent eab2c2007b
commit 831597748b

View File

@@ -651,6 +651,12 @@ function main(): void
}
}
if (!defined('STDIN') || !stream_isatty(STDIN)
|| !defined('STDOUT') || !stream_isatty(STDOUT)
|| !defined('STDERR') || !stream_isatty(STDERR)) {
$environment['SKIP_IO_CAPTURE_TESTS'] = '1';
}
if ($selected_tests && count($test_files) === 0) {
echo "No tests found.\n";
return;