diff options
Diffstat (limited to 'src')
-rw-r--r--[-rwxr-xr-x] | src/php/.gitignore | 5 | ||||
-rwxr-xr-x | src/php/bin/run_tests.sh | 16 | ||||
-rwxr-xr-x | src/php/ext/grpc/config.m4 | 17 |
3 files changed, 23 insertions, 15 deletions
diff --git a/src/php/.gitignore b/src/php/.gitignore index 00fbd965dc..0bb5f8e956 100755..100644 --- a/src/php/.gitignore +++ b/src/php/.gitignore @@ -15,4 +15,7 @@ run-tests.php install-sh libtool missing -mkinstalldirs
\ No newline at end of file +mkinstalldirs + +ext/grpc/ltmain.sh + 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 diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4 index d7d13f413e..27c67781e7 100755 --- a/src/php/ext/grpc/config.m4 +++ b/src/php/ext/grpc/config.m4 @@ -38,7 +38,9 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt) - PHP_ADD_LIBPATH($GRPC_DIR/lib) + GRPC_LIBDIR=$GRPC_DIR/${GRPC_LIB_SUBDIR-lib} + + PHP_ADD_LIBPATH($GRPC_LIBDIR) PHP_CHECK_LIBRARY(gpr,gpr_now, [ @@ -48,18 +50,9 @@ if test "$PHP_GRPC" != "no"; then ],[ AC_MSG_ERROR([wrong gpr lib version or lib not found]) ],[ - -L$GRPC_DIR/lib + -L$GRPC_LIBDIR ]) - PHP_ADD_LIBRARY(event,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(event) - - PHP_ADD_LIBRARY(event_pthreads,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(event_pthreads) - - PHP_ADD_LIBRARY(event_core,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(event_core) - PHP_CHECK_LIBRARY(grpc,grpc_channel_destroy, [ PHP_ADD_LIBRARY(grpc,,GRPC_SHARED_LIBADD) @@ -68,7 +61,7 @@ if test "$PHP_GRPC" != "no"; then ],[ AC_MSG_ERROR([wrong grpc lib version or lib not found]) ],[ - -L$GRPC_DIR/lib + -L$GRPC_LIBDIR ]) PHP_SUBST(GRPC_SHARED_LIBADD) |