Skip to content

Commit 6b8fa15

Browse files
committed
Fail to run tests if the extension is not built
1 parent 5106db2 commit 6b8fa15

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extension/BuildPhpExtension/private/Invoke-Tests.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ Function Invoke-Tests {
2424
if ((Select-String -Path 'config.w32' -Pattern 'ZEND_EXTENSION\(' -Quiet) -eq $true) {
2525
$type='zend_extension'
2626
}
27+
$extensionPath = "$currentDirectory\$($Config.build_directory)\php_$($Config.name).dll"
28+
if(-not(Test-Path $extensionPath)) {
29+
throw "Extension was not built successfully. Cannot run tests."
30+
}
2731
$php_args = @(
2832
"-n",
29-
"-d $type=$currentDirectory\$($Config.build_directory)\php_$($Config.name).dll"
33+
"-d $type=$extensionPath"
3034
)
3135
$env:TEST_PHP_ARGS = $php_args -join ' '
3236
if ($null -eq $env:TEST_RUNNER) {

0 commit comments

Comments
 (0)