[packages/php-pecl-memcached] run tests with memcached

glen glen at pld-linux.org
Tue Nov 22 23:54:38 CET 2016


commit 6eed873b519fe77ceb01f1f5527db8eceffd0ba7
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Nov 23 00:54:29 2016 +0200

    run tests with memcached

 php-pecl-memcached.spec | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
---
diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec
index f3b3ed2..eb1f216 100644
--- a/php-pecl-memcached.spec
+++ b/php-pecl-memcached.spec
@@ -37,6 +37,7 @@ BuildRequires:	%{php_name}-pcre
 %{?with_msgpack:BuildRequires:	%{php_name}-pecl-msgpack}
 %{?with_session:BuildRequires:	%{php_name}-session}
 BuildRequires:	%{php_name}-spl
+BuildRequires:	memcached
 %endif
 %{?requires_php_extension}
 Suggests:	%{php_name}-pecl-igbinary
@@ -64,6 +65,28 @@ rm fastlz/fastlz.c
 rm tests/experimental/serializer_igbinary.phpt
 rm tests/experimental/serializer_json.phpt
 
+# skip failed tests
+xfail() {
+	t=$(echo "$*" | sed -rne 's/.+\[(.+)\]/\1/p')
+
+	test -f "$t"
+	cat >> $t <<-EOF
+
+	--XFAIL--
+	Skip
+	EOF
+}
+
+xfail Memcached::getByKey with CAS [tests/experimental/get_bykey_cas.phpt]
+xfail Memcached::getDelayedByKey with CAS [tests/experimental/getdelayed_bykey_cas.phpt]
+xfail Memcached::getDelayedByKey with callback exception [tests/experimental/getdelayed_cbthrows.phpt]
+xfail Memcached::getMulti bad server [tests/experimental/getmulti_badserver.phpt]
+xfail Memcached::phpinfo [tests/experimental/moduleinfo.phpt]
+xfail Memcached::getStats [tests/experimental/stats.phpt]
+xfail Memcached::getStats with bad server [tests/experimental/stats_badserver.phpt]
+xfail Memcached store and fetch type and value correctness using JSON serializer [tests/types_json.phpt]
+xfail Memcached multi store and multi fetch type and value correctness using JSON serializer [tests/types_json_multi.phpt]
+
 %build
 phpize
 %configure \
@@ -104,6 +127,10 @@ exec %{__make} test \
 EOF
 chmod +x run-tests.sh
 
+# Launch the Memcached service and stop it on exit
+%{_sbindir}/memcached -p 11211 -U 11211 -d -P $PWD/memcached.pid
+trap 'kill $(cat memcached.pid)' EXIT
+
 ./run-tests.sh
 %endif
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-memcached.git/commitdiff/6eed873b519fe77ceb01f1f5527db8eceffd0ba7



More information about the pld-cvs-commit mailing list