aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/bin/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/php/bin/run_tests.sh')
-rwxr-xr-xsrc/php/bin/run_tests.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/php/bin/run_tests.sh b/src/php/bin/run_tests.sh
index cf4cc78a52..28282c3e37 100755
--- a/src/php/bin/run_tests.sh
+++ b/src/php/bin/run_tests.sh
@@ -1,5 +1,17 @@
+#!/bin/sh
# Loads the local shared library, and runs all of the test cases in tests/
# against it
+set -e
cd $(dirname $0)
-php -d extension_dir=../ext/grpc/modules/ -d extension=grpc.so \
- /usr/local/bin/phpunit -v --debug --strict ../tests/unit_tests
+default_extension_dir=`php -i | grep extension_dir | sed 's/.*=> //g'`
+
+# sym-link in system supplied extensions
+for f in $default_extension_dir/*.so
+do
+ ln -s $f ../ext/grpc/modules/$(basename $f) &> /dev/null || true
+done
+
+php \
+ -d extension_dir=../ext/grpc/modules/ \
+ -d extension=grpc.so \
+ `which phpunit` -v --debug --strict ../tests/unit_tests