Apply smoke test control option for frankenphp

This commit is contained in:
crazywhalecc 2026-02-27 09:59:55 +08:00
parent b3d67b928a
commit 8c7d113c2f
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -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)) {