mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
let sanity check can be overwritten
This commit is contained in:
parent
b1ae48a209
commit
5db23e1db7
@ -166,10 +166,11 @@ class Extension
|
|||||||
/**
|
/**
|
||||||
* Run compile check if build target is cli
|
* 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 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
|
* @throws RuntimeException
|
||||||
*/
|
*/
|
||||||
public function runCheck(): void
|
public function runCliCheck(): void
|
||||||
{
|
{
|
||||||
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri "' . $this->getDistName() . '"', false);
|
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri "' . $this->getDistName() . '"', false);
|
||||||
if ($ret !== 0) {
|
if ($ret !== 0) {
|
||||||
|
|||||||
@ -66,7 +66,7 @@ trait UnixBuilderTrait
|
|||||||
|
|
||||||
foreach ($this->exts as $ext) {
|
foreach ($this->exts as $ext) {
|
||||||
logger()->debug('testing ext: ' . $ext->getName());
|
logger()->debug('testing ext: ' . $ext->getName());
|
||||||
$ext->runCheck();
|
$ext->runCliCheck();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user