[Pkg-libvirt-commits] [libguestfs] 34/59: php: add a custom PHP runner for tests
Hilko Bengen
bengen at moszumanska.debian.org
Thu Mar 20 23:05:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 5fbbfe7440009aff3a6a8f584a1cea777ef2b5dc
Author: Pino Toscano <ptoscano at redhat.com>
Date: Wed Mar 12 19:24:39 2014 +0100
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.
---
.gitignore | 1 +
configure.ac | 2 ++
php/extension/php-for-tests.sh.in | 4 ++++
php/run-php-tests.sh | 2 +-
4 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 0c61b5b..830a40d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -360,6 +360,7 @@ Makefile.in
/php/extension/mkinstalldirs
/php/extension/missing
/php/extension/modules/
+/php/extension/php-for-tests.sh
/php/extension/php_guestfs_php.h
/php/extension/run-tests.php
/php/extension/tmp-php.ini
diff --git a/configure.ac b/configure.ac
index 3785ea8..a01b0de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1595,6 +1595,8 @@ AC_CONFIG_FILES([appliance/libguestfs-make-fixed-appliance],
[chmod +x,-w appliance/libguestfs-make-fixed-appliance])
AC_CONFIG_FILES([inspector/test-xmllint.sh],
[chmod +x,-w inspector/test-xmllint.sh])
+AC_CONFIG_FILES([php/extension/php-for-tests.sh],
+ [chmod +x,-w php/extension/php-for-tests.sh])
AC_CONFIG_FILES([pick-guests.pl],
[chmod +x,-w pick-guests.pl])
AC_CONFIG_FILES([podwrapper.pl],
diff --git a/php/extension/php-for-tests.sh.in b/php/extension/php-for-tests.sh.in
new file mode 100755
index 0000000..0639ce3
--- /dev/null
+++ b/php/extension/php-for-tests.sh.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+. ./env
+ at PHP@ $@
diff --git a/php/run-php-tests.sh b/php/run-php-tests.sh
index 63701e9..6f9ae10 100755
--- a/php/run-php-tests.sh
+++ b/php/run-php-tests.sh
@@ -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"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list