php: add a custom PHP runner for tests

Since the default PHP test runner ignores a good number of environment
variables to potentially tampering the test suite execution, create a
custom php-for-tests.sh script which does nothing more than sourcing the
custom environment that our run-php-tests.sh outputs and running the
actual "php" executable (the one found by configure).

This fixes the loading of the guestfs_php.so module in the test suite,
as the libguestfs.so.0 library can be found by that module.
This commit is contained in:
Pino Toscano
2014-03-12 19:24:39 +01:00
parent 04aaa6ddfc
commit 5fbbfe7440
4 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
#!/bin/sh
. ./env
@PHP@ $@

View File

@@ -45,4 +45,4 @@ TESTS=$(echo guestfs_php_*.phpt)
echo TESTS: $TESTS
# PHP ignores the result of the tests!
make test TESTS="$TESTS"
make test TESTS="$TESTS" PHP_EXECUTABLE="$PWD/php-for-tests.sh"