let sanity check can be overwritten

This commit is contained in:
crazywhalecc 2023-11-01 01:49:48 +08:00 committed by Jerry Ma
parent b1ae48a209
commit 5db23e1db7
2 changed files with 3 additions and 2 deletions

View File

@ -166,10 +166,11 @@ class Extension
/**
* Run compile check if build target is cli
* If you need to run some check, overwrite this or add your assert in src/globals/tests/{extension_name}.php
* If check failed, throw RuntimeException
*
* @throws RuntimeException
*/
public function runCheck(): void
public function runCliCheck(): void
{
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri "' . $this->getDistName() . '"', false);
if ($ret !== 0) {

View File

@ -66,7 +66,7 @@ trait UnixBuilderTrait
foreach ($this->exts as $ext) {
logger()->debug('testing ext: ' . $ext->getName());
$ext->runCheck();
$ext->runCliCheck();
}
}