From bfabdcf824f76d9b24cee465805cb18cc97db006 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 8 Feb 2018 05:51:20 +0100 Subject: add patch to skip online test from https://github.com/phpredis/phpredis/pull/1304 --- php-pecl-redis4.spec | 10 +++++++++- redis-tests.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 redis-tests.patch diff --git a/php-pecl-redis4.spec b/php-pecl-redis4.spec index fe948e2..2f05def 100644 --- a/php-pecl-redis4.spec +++ b/php-pecl-redis4.spec @@ -34,12 +34,14 @@ Summary: Extension for communicating with the Redis key-value store Name: %{?sub_prefix}php-pecl-redis4 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz License: PHP Group: Development/Languages URL: http://pecl.php.net/package/redis +Patch0: %{pecl_name}-tests.patch + BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear %if %{with_igbin} @@ -123,6 +125,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr + # Use system library rm -r liblzf @@ -319,6 +323,10 @@ fi %changelog +* Wed Feb 7 2018 Remi Collet - 4.0.0~RC1-3 +- add patch to skip online test from + https://github.com/phpredis/phpredis/pull/1304 + * Wed Feb 7 2018 Remi Collet - 4.0.0~RC1-1 - update to 4.0.0RC1 - rename to php-pecl-redis4 diff --git a/redis-tests.patch b/redis-tests.patch new file mode 100644 index 0000000..07dbb42 --- /dev/null +++ b/redis-tests.patch @@ -0,0 +1,28 @@ +From 627bd89b45ba09b689e692a23370e5d82d9829a1 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 8 Feb 2018 05:47:28 +0100 +Subject: [PATCH] skip online test + +--- + tests/RedisTest.php | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tests/RedisTest.php b/tests/RedisTest.php +index 4c0b7884..4d807a78 100644 +--- a/tests/RedisTest.php ++++ b/tests/RedisTest.php +@@ -5164,9 +5164,13 @@ public function testMultipleConnect() { + } + + public function testConnectException() { ++ $host = 'github.com'; ++ if (gethostbyname($host) === $host) { ++ return $this->markTestSkipped('online test'); ++ } + $redis = new Redis(); + try { +- $redis->connect('github.com', 6379, 0.01); ++ $redis->connect($host, 6379, 0.01); + } catch (Exception $e) { + $this->assertTrue(strpos($e, "timed out") !== false); + } -- cgit