| echo "Running memory leak test, args: $@" |
| ARGS="-d xdebug.profiler_enable=0 -d display_errors=on -dextension=../ext/google/protobuf/modules/protobuf.so" |
| EXTRA_ARGS=-dprotobuf.keep_descriptor_pool_after_request=1 |
| export ZEND_DONT_UNLOAD_MODULES=1 |
| if valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all --suppressions=valgrind.supp --num-callers=100 php $ARGS $EXTRA_ARGS memory_leak_test.php; then |
| echo "Memory leak test SUCCEEDED" |
| echo "Memory leak test FAILED" |
| run_test --keep_descriptors |