aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/tests/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'php/tests/test.sh')
-rwxr-xr-xphp/tests/test.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/php/tests/test.sh b/php/tests/test.sh
index c35372d3..6e70eb2a 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
@@ -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