OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 # Generate test file |
| 4 ../../src/protoc --php_out=. test.proto test_include.proto |
| 5 |
| 6 # Compile c extension |
| 7 pushd ../ext/google/protobuf/ |
| 8 make clean |
| 9 set -e |
| 10 # Add following in configure for debug: --enable-debug CFLAGS='-g -O0' |
| 11 phpize && ./configure && make |
| 12 popd |
| 13 |
| 14 tests=( array_test.php encode_decode_test.php generated_class_test.php map_field
_test.php well_known_test.php ) |
| 15 |
| 16 for t in "${tests[@]}" |
| 17 do |
| 18 echo "****************************" |
| 19 echo "* $t" |
| 20 echo "****************************" |
| 21 php -dextension=../ext/google/protobuf/modules/protobuf.so `which phpunit` $t |
| 22 echo "" |
| 23 done |
| 24 |
| 25 # Make sure to run the memory test in debug mode. |
| 26 php -dextension=../ext/google/protobuf/modules/protobuf.so memory_leak_test.php |
| 27 |
| 28 USE_ZEND_ALLOC=0 valgrind --leak-check=yes php -dextension=../ext/google/protobu
f/modules/protobuf.so memory_leak_test.php |
OLD | NEW |