From 8c7d113c2f802edb4ca3e0e88edd45f1ca04d8de Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 27 Feb 2026 09:59:55 +0800 Subject: [PATCH] Apply smoke test control option for frankenphp --- src/Package/Target/php/frankenphp.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Package/Target/php/frankenphp.php b/src/Package/Target/php/frankenphp.php index 669d00c3..8b2fb81d 100644 --- a/src/Package/Target/php/frankenphp.php +++ b/src/Package/Target/php/frankenphp.php @@ -106,8 +106,19 @@ trait frankenphp } #[Stage] - public function smokeTestFrankenphpForUnix(): void + public function smokeTestFrankenphpForUnix(PackageBuilder $builder): void { + // analyse --no-smoke-test option + $no_smoke_test = $builder->getOption('no-smoke-test', false); + $option = match ($no_smoke_test) { + false => false, // default value, run all smoke tests + null => 'all', // --no-smoke-test without value, skip all smoke tests + default => parse_comma_list($no_smoke_test), // --no-smoke-test=frankenphp,... + }; + if ($option === 'all' || (is_array($option) && in_array('frankenphp', $option, true))) { + return; + } + InteractiveTerm::setMessage('Running FrankenPHP smoke test'); $frankenphp = BUILD_BIN_PATH . '/frankenphp'; if (!file_exists($frankenphp)) {