1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 00:22:40 +00:00

Don't force PHP as the langauge of extension tests

Test: gd
This commit is contained in:
Michele Locati 2020-10-18 14:05:35 +02:00
parent 4cba84276e
commit 7a7519b64a
No known key found for this signature in database
GPG key ID: 98B7CE2E7234E28B
3 changed files with 36 additions and 11 deletions

View file

@ -9,7 +9,10 @@ $nameMap = [
$testsDir = __DIR__ . '/tests';
function runTest($testFile)
{
return include $testFile;
$rc = -1;
passthru($testFile, $rc);
return $rc === 0;
}
for ($index = 1, $count = isset($argv) ? count($argv) : 0; $index < $count; $index++) {
@ -26,7 +29,7 @@ for ($index = 1, $count = isset($argv) ? count($argv) : 0; $index < $count; $ind
if (!extension_loaded($extension)) {
fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension));
} else {
$testFile = "{$testsDir}/{$extension}.php";
$testFile = "{$testsDir}/{$extension}";
if (is_file($testFile)) {
try {
if (runTest($testFile) === true) {