From 831597748ba812d0c0d2bc7909be7ee0804b3ce5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 30 Sep 2025 16:35:52 +0200 Subject: [PATCH] Automatically skip tty tests if not on tty See GH-19975 Closes GH-20013 --- run-tests.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run-tests.php b/run-tests.php index d51ab99a205..8fb638ed3e8 100755 --- a/run-tests.php +++ b/run-tests.php @@ -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;