From ebe04f7073da141506c8a565e1a76af1b234477a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 26 Jul 2016 12:25:30 +0200 Subject: php 5.6: improve datetests patch --- php-5.6.24-datetests.patch | 103 +++++++++++++++++++++++++++++++++++++++++++++ php-5.6.3-datetests.patch | 23 ---------- php56.spec | 3 +- 3 files changed, 105 insertions(+), 24 deletions(-) create mode 100644 php-5.6.24-datetests.patch delete mode 100644 php-5.6.3-datetests.patch diff --git a/php-5.6.24-datetests.patch b/php-5.6.24-datetests.patch new file mode 100644 index 0000000..9f3bbfe --- /dev/null +++ b/php-5.6.24-datetests.patch @@ -0,0 +1,103 @@ +diff -up ./ext/date/tests/bug33414-2.phpt.datetests ./ext/date/tests/bug33414-2.phpt +--- ./ext/date/tests/bug33414-2.phpt.datetests 2016-07-21 02:23:03.000000000 +0200 ++++ ./ext/date/tests/bug33414-2.phpt 2016-07-26 07:28:10.323598643 +0200 +@@ -74,7 +74,7 @@ $strtotime_tstamp = strtotime("next Frid + print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; + print "wanted=Friday 00:00:00\n\n"; + ?> +---EXPECT-- ++--EXPECTF-- + TZ=Pacific/Rarotonga - wrong day. + tStamp=Thursday 1970-01-01 17:17:17 CKT 0 + result=Tuesday 1970-01-06 00:00:00 CKT 0 +@@ -106,8 +106,8 @@ result=Tuesday 2005-04-12 00:00:00 CDT 1 + wanted=Tuesday 00:00:00 + + TZ=Pacific/Pitcairn - wrong day. +-tStamp=Thursday 1970-01-01 17:17:17 PNT 0 +-result=Wednesday 1970-01-07 00:00:00 PNT 0 ++tStamp=Thursday 1970-%s ++result=Wednesday 1970-%s + wanted=Wednesday 00:00:00 + + TZ=Pacific/Fakaofo - wrong day. +diff -up ./ext/date/tests/bug66985.phpt.datetests ./ext/date/tests/bug66985.phpt +--- ./ext/date/tests/bug66985.phpt.datetests 2016-07-21 02:23:03.000000000 +0200 ++++ ./ext/date/tests/bug66985.phpt 2016-07-26 07:28:10.323598643 +0200 +@@ -3,7 +3,7 @@ Bug #66985 (Some timezones are no longer + --FILE-- + 3 +- [timezone] => Factory +-) +-DateTimeZone Object +-( + [timezone_type] => 3 + [timezone] => GB-Eire + ) +diff -up ./ext/date/tests/date_sunrise_variation9.phpt.datetests ./ext/date/tests/date_sunrise_variation9.phpt +--- ./ext/date/tests/date_sunrise_variation9.phpt.datetests 2016-07-21 02:23:03.000000000 +0200 ++++ ./ext/date/tests/date_sunrise_variation9.phpt 2016-07-26 07:28:10.323598643 +0200 +@@ -43,5 +43,5 @@ int\((-1097256359|123456811756)\) + -- Testing date_sunrise\(\) function by passing float -12.3456789000e10 value to time -- + string\(5\) "(07:42|08:48|08:04)" + float\((7.713[0-9]*|8.810[0-9]*|8.074[0-9]*)\) +-int\((1097304168|-2147443882|-123456761731)\) ++int\((.*)\) + ===DONE=== +diff -up ./ext/date/tests/date_sunset_variation9.phpt.datetests ./ext/date/tests/date_sunset_variation9.phpt +--- ./ext/date/tests/date_sunset_variation9.phpt.datetests 2016-07-21 02:23:03.000000000 +0200 ++++ ./ext/date/tests/date_sunset_variation9.phpt 2016-07-26 07:28:10.323598643 +0200 +@@ -43,5 +43,5 @@ int\((-1097212211|123456853728)\) + -- Testing date_sunset\(\) function by passing float -12.3456789000e10 value to time -- + string\(5\) "(19:03|18:12|18:48)" + float\((19.056[0-9]*|18.213[0-9]*|18.808[0-9]*)\) +-int\((1097345002|-2147410031|-123456723090)\) ++int\((.*)\) + ===DONE=== +diff -up ./ext/date/tests/getdate_variation7.phpt.datetests ./ext/date/tests/getdate_variation7.phpt +--- ./ext/date/tests/getdate_variation7.phpt.datetests 2016-07-21 02:23:03.000000000 +0200 ++++ ./ext/date/tests/getdate_variation7.phpt 2016-07-26 07:28:10.323598643 +0200 +@@ -55,9 +55,9 @@ array\(11\) { + \["seconds"\]=> + int\((.+)\) + \["minutes"\]=> +- int\((39|23)\) ++ int\(([0-9]*)\) + \["hours"\]=> +- int\((0|2|5)\) ++ int\(([0-9]*)\) + \["mday"\]=> + int\((9|14|23)\) + \["wday"\]=> +diff -up ./ext/date/tests/strtotime3-64bit.phpt.datetests ./ext/date/tests/strtotime3-64bit.phpt +--- ./ext/date/tests/strtotime3-64bit.phpt.datetests 2016-07-21 02:23:03.000000000 +0200 ++++ ./ext/date/tests/strtotime3-64bit.phpt 2016-07-26 07:39:45.713272263 +0200 +@@ -44,7 +44,7 @@ foreach ($strs as $str) { + } + + ?> +---EXPECT-- ++--EXPECTF-- + bool(false) + bool(false) + string(31) "Thu, 15 Jun 2006 00:00:00 +0100" +@@ -53,7 +53,7 @@ bool(false) + string(31) "Fri, 16 Jun 2006 23:49:12 +0100" + bool(false) + string(31) "Fri, 16 Jun 2006 02:22:00 +0100" +-string(31) "Sun, 16 Jun 0222 02:22:00 -0036" ++string(31) "Sun, 16 Jun 0222 02:22:00 %s" + string(31) "Fri, 16 Jun 2006 02:22:33 +0100" + bool(false) + string(31) "Tue, 02 Mar 2004 00:00:00 +0000" diff --git a/php-5.6.3-datetests.patch b/php-5.6.3-datetests.patch deleted file mode 100644 index a29bb63..0000000 --- a/php-5.6.3-datetests.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/ext/date/tests/bug66985.phpt 2014-10-30 07:32:03.297693403 +0100 -+++ b/ext/date/tests/bug66985.phpt 2014-10-30 07:32:45.138877977 +0100 -@@ -3,7 +3,7 @@ - --FILE-- - 3 -- [timezone] => Factory --) --DateTimeZone Object --( - [timezone_type] => 3 - [timezone] => GB-Eire - ) diff --git a/php56.spec b/php56.spec index 313c23a..8d5c644 100644 --- a/php56.spec +++ b/php56.spec @@ -205,7 +205,8 @@ Patch91: php-5.6.3-oci8conf.patch # Fixes for tests (300+) # Factory is droped from system tzdata -Patch300: php-5.6.3-datetests.patch +# Relax some tests with erratic results with system tzdata +Patch300: php-5.6.24-datetests.patch # Revert changes for pcre < 8.34 Patch301: php-5.6.0-oldpcre.patch -- cgit