Add memcache with udp listen for tests dev-4.0.3 master auto/th/php-pecl-memcache-4.0.4-1
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 21 Aug 2019 09:15:24 +0000 (12:15 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Fri, 4 Oct 2019 10:38:31 +0000 (13:38 +0300)
php-pecl-memcache.spec
tests.patch [new file with mode: 0644]

index eae669074cade4e482f74d591e555b7672c16ab2..86faccd2193b754b5c17319351c75d8b20b9584e 100644 (file)
@@ -21,6 +21,7 @@ Source2:      %{modname}-apache.conf
 Source3:       %{modname}-lighttpd.conf
 Source4:       config.php
 Patch0:                %{modname}-webapp.patch
+Patch1:                tests.patch
 URL:           https://github.com/websupport-sk/pecl-memcache/
 BuildRequires: %{php_name}-devel >= 3:7.0.0
 BuildRequires: %{php_name}-pcre
@@ -91,6 +92,7 @@ memcache.
 %setup -qc
 mv pecl-%{modname}-*/{.??*,*} .
 %patch0 -p1
+%patch1 -p1
 
 cat <<'EOF' > run-tests.sh
 #!/bin/sh
@@ -172,8 +174,10 @@ grep %{modname} modules.log
 
 %if %{with tests}
 # Launch the Memcached service and stop it on exit
+domainsocket=$PWD/memcached.sock
 %{_sbindir}/memcached -p 11211 -U 11211 -d -P $PWD/memcached.pid
-trap 'kill $(cat memcached.pid)' EXIT INT
+%{_sbindir}/memcached -s $domainsocket -d -P $PWD/memcached-udp.pid
+trap 'kill $(cat memcached.pid memcached-udp.pid)' EXIT INT
 
 ./run-tests.sh --show-diff
 %endif
diff --git a/tests.patch b/tests.patch
new file mode 100644 (file)
index 0000000..ba6fbbb
--- /dev/null
@@ -0,0 +1,12 @@
+--- php73-pecl-memcache-4.0.4/tests/connect.inc~       2019-05-28 11:55:34.000000000 +0300
++++ php73-pecl-memcache-4.0.4/tests/connect.inc        2019-08-20 17:25:17.729668632 +0300
+@@ -34,7 +34,8 @@
+  * memcached -d -u memcached -s /var/run/memcached/memcached.sock
+  * chmod a+w /var/run/memcached/memcached.sock
+  */
+-$domainsocket = 'unix:///var/run/memcached/memcached.sock';
++$cwd = getcwd();
++$domainsocket = "unix://{$cwd}/memcached.sock";
+ // A server which is guaranteed to fail immediatly
+ $nonExistingHost = "localhost";
This page took 0.062783 seconds and 4 git commands to generate.