diff options
Diffstat (limited to 'src/php/bin/run_tests.sh')
-rwxr-xr-x | src/php/bin/run_tests.sh | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/src/php/bin/run_tests.sh b/src/php/bin/run_tests.sh index 422757bb44..4c37285455 100755 --- a/src/php/bin/run_tests.sh +++ b/src/php/bin/run_tests.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2015, Google Inc. # All rights reserved. # @@ -32,33 +32,6 @@ # against it set -e cd $(dirname $0) -default_extension_dir=`php -i | grep extension_dir | sed 's/.*=> //g'` - -if command -v brew >/dev/null && [ -d `brew --prefix`/opt/grpc-php ] -then - # homebrew and the grpc-php formula are installed - extension_dir="-d extension_dir="`brew --prefix`/opt/grpc-php -elif [ ! -e $default_extension_dir/grpc.so ] -then - # the grpc extension is not found in the default PHP extension dir - # try the source modules directory - module_dir=../ext/grpc/modules - if [ ! -d $module_dir ] - then - echo "Please run 'phpize && ./configure && make' from ext/grpc first" - exit 1 - fi - - # sym-link in system supplied extensions - for f in $default_extension_dir/*.so - do - ln -s $f $module_dir/$(basename $f) &> /dev/null || true - done - - extension_dir='-d extension_dir='$module_dir -fi - -php \ - $extension_dir \ - -d extension=grpc.so \ - `which phpunit` -v --debug --strict ../tests/unit_tests +source ./determine_extension_dir.sh +php $extension_dir -d extension=grpc.so $(which phpunit) -v --debug --strict \ + ../tests/unit_tests |