1#!/bin/bash 2 3export CFLAGS="-fstack-protector-strong -O2" 4export CPPFLAGS="${CFLAGS}" 5export LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" 6 7# Build extension 8set -eux 9cd /usr/src 10 11git clone https://github.com/websupport-sk/pecl-memcache.git 12 13cd pecl-memcache; 14phpize 15./configure 16make -j"$(nproc)" 17 18# Spawn memcached for tests 19echo "Starting memcached... " 20mkdir -p /var/run/memcached 21chown memcache:memcache /var/run/memcached 22/usr/bin/memcached -m 64 -u memcache -s /var/run/memcached/memcached.sock -d 23/usr/bin/memcached -m 64 -u memcache -U 11211 -l 127.0.0.1 -p 11211 -d 24/usr/bin/memcached -m 64 -u memcache -U 11212 -l 127.0.0.1 -p 11212 -d 25 26# Let's start tests 27cd /usr/src/pecl-memcache 28export NO_INTERACTION=1 29export TEST_PHP_ARGS="--show-diff --keep-all -w fails.log" 30 31MEMCACHE_PROTOCOL=ascii make test 32MEMCACHE_PROTOCOL=binary make test 33