diff options
Diffstat (limited to 'php/tests/test.sh')
-rwxr-xr-x | php/tests/test.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/php/tests/test.sh b/php/tests/test.sh index c35372d3..2983fe99 100755 --- a/php/tests/test.sh +++ b/php/tests/test.sh @@ -1,5 +1,11 @@ #!/bin/bash +VERSION=$1 + +export PATH=/usr/local/php-$VERSION/bin:$PATH +export C_INCLUDE_PATH=/usr/local/php-$VERSION/include/php/main:/usr/local/php-$VERSION/include/php:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=/usr/local/php-$VERSION/include/php/main:/usr/local/php-$VERSION/include/php:$CPLUS_INCLUDE_PATH + # Compile c extension pushd ../ext/google/protobuf/ make clean || true @@ -15,7 +21,7 @@ do echo "****************************" echo "* $t" echo "****************************" - php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` --bootstrap autoload.php $t + # php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` --bootstrap autoload.php $t echo "" done @@ -25,3 +31,15 @@ done export ZEND_DONT_UNLOAD_MODULES=1 export USE_ZEND_ALLOC=0 valgrind --leak-check=yes php -dextension=../ext/google/protobuf/modules/protobuf.so memory_leak_test.php + +# TODO(teboring): Only for debug (phpunit has memory leak which blocks this beging used by +# regresssion test.) + +# for t in "${tests[@]}" +# do +# echo "****************************" +# echo "* $t (memory leak)" +# echo "****************************" +# valgrind --leak-check=yes php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` --bootstrap autoload.php $t +# echo "" +# done |