Accepting request 1142010 from home:adkorte:branches:server:php:extensions

- Expect test to fail as the values ImageMagick will accept are limited
  by the policy.xml of the system which is more restrictive now
  + imagick-xfail-test014.patch
- Fix test failing since ImageMagick 7.1.1.24 due to changed calculation
  of kurtosis and skewness values
  + imagick-fix-test316.patch

OBS-URL: https://build.opensuse.org/request/show/1142010
OBS-URL: https://build.opensuse.org/package/show/server:php:extensions/php-imagick?expand=0&rev=14
This commit is contained in:
Arjen de Korte 2024-01-27 21:02:09 +00:00 committed by Git OBS Bridge
parent 9dab651cdd
commit 05f282e7d6
4 changed files with 46 additions and 0 deletions

19
imagick-fix-test316.patch Normal file
View File

@ -0,0 +1,19 @@
diff -purN a/tests/316_Imagick_getImageKurtosis.phpt b/tests/316_Imagick_getImageKurtosis.phpt
--- a/tests/316_Imagick_getImageKurtosis.phpt 2022-01-11 16:23:47.000000000 +0100
+++ b/tests/316_Imagick_getImageKurtosis.phpt 2024-01-22 20:29:18.738097214 +0100
@@ -14,8 +14,13 @@ function getImageKurtosis() {
$imagick = new \Imagick(__DIR__ . '/Biter_500.jpg');
$values = $imagick->getImageKurtosis();
- check_value($values, "kurtosis", -0.9379261035010518);
- check_value($values, "skewness", 0.4562517200972045);
+ if (isVersionGreaterEqual('6.9.13-2', '7.1.1-24')) {
+ check_value($values, "kurtosis", -0.7092599567492);
+ check_value($values, "skewness", 0.56839010636614);
+ } else {
+ check_value($values, "kurtosis", -0.9379261035010518);
+ check_value($values, "skewness", 0.4562517200972045);
+ }
}
getImageKurtosis() ;

View File

@ -0,0 +1,12 @@
diff -purN a/tests/014-setresourcelimit.phpt b/tests/014-setresourcelimit.phpt
--- a/tests/014-setresourcelimit.phpt 2022-01-11 16:23:45.000000000 +0100
+++ b/tests/014-setresourcelimit.phpt 2024-01-21 21:21:54.685527129 +0100
@@ -5,6 +5,8 @@ Imagick::setResourceLimit test
$imageMagickRequiredVersion=0x692;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
+--XFAIL--
+These tests are flaky as the values ImageMagick will accept are limited by the policy.xml of the system.
--FILE--
<?php

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Sun Jan 21 20:38:00 UTC 2024 - Arjen de Korte <suse+build@de-korte.org>
- Expect test to fail as the values ImageMagick will accept are limited
by the policy.xml of the system which is more restrictive now
+ imagick-xfail-test014.patch
- Fix test failing since ImageMagick 7.1.1.24 due to changed calculation
of kurtosis and skewness values
+ imagick-fix-test316.patch
-------------------------------------------------------------------
Sat Dec 10 10:32:12 UTC 2022 - Arjen de Korte <suse+build@de-korte.org>

View File

@ -41,6 +41,10 @@ Source0: https://pecl.php.net/get/%{pkg_name}-%{version}.tgz
Source1: php-%{pkg_name}-rpmlintrc
# SUSE: Make build reproduceable
Patch0: imagick-reproducible.patch
# PATCH-FIX-OPENSUSE - test expected to fail because of resource limits in policy.xml
Patch10: imagick-xfail-test014.patch
# PATCH-FIX-OPENSUSE - calculation of kurtosis and skewness was fixed in Imagick-7.1.1.24
Patch11: imagick-fix-test316.patch
BuildRequires: %{php_name}-devel >= 7.0.1
BuildRequires: ImageMagick-devel >= 6.5.3.10
BuildRequires: ghostscript-fonts-std