test.sh 810 B

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