From b9567da378e314adff31d1151f71335d607888e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Tue, 21 Jun 2022 11:57:29 +0200 Subject: [PATCH] Skip failing tests on bugged versions (PHP 8.1.7 and PHP 8.0.20 only) --- tests/AbstractProcessTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/AbstractProcessTest.php b/tests/AbstractProcessTest.php index de7da35..545272e 100644 --- a/tests/AbstractProcessTest.php +++ b/tests/AbstractProcessTest.php @@ -643,6 +643,10 @@ public function testDetectsClosingStdoutWithoutHavingToWaitForExit() $this->markTestSkipped('Process pipes not supported on Windows'); } + if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) { + $this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827'); + } + $cmd = 'exec ' . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDOUT); sleep(1);'); $loop = $this->createLoop(); @@ -669,6 +673,10 @@ public function testDetectsClosingStdoutWithoutHavingToWaitForExit() */ public function testDetectsClosingStdoutSocketWithoutHavingToWaitForExit() { + if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) { + $this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827'); + } + $loop = $this->createLoop(); $process = new Process( (DIRECTORY_SEPARATOR === '\\' ? '' : 'exec ') . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDOUT); sleep(1);'), @@ -703,6 +711,10 @@ public function testKeepsRunningEvenWhenAllStdioPipesHaveBeenClosed() $this->markTestSkipped('Process pipes not supported on Windows'); } + if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) { + $this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827'); + } + $cmd = 'exec ' . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDIN);fclose(STDOUT);fclose(STDERR);sleep(1);'); $loop = $this->createLoop(); @@ -738,6 +750,10 @@ public function testKeepsRunningEvenWhenAllStdioPipesHaveBeenClosed() */ public function testKeepsRunningEvenWhenAllStdioSocketsHaveBeenClosed() { + if (PHP_VERSION_ID === 80107 || PHP_VERSION_ID === 80020) { + $this->markTestSkipped('Skip bugged PHP version: https://github.com/php/php-src/issues/8827'); + } + $loop = $this->createLoop(); $process = new Process( (DIRECTORY_SEPARATOR === '\\' ? '' : 'exec ') . $this->getPhpBinary() . ' -r ' . escapeshellarg('fclose(STDIN);fclose(STDOUT);fclose(STDERR);sleep(1);'),