From 535677aa157815c5e87ff567b5157bafc758b220 Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Jul 18 2019 10:33:02 +0000 Subject: - fix some tests --- diff --git a/OpenEXR.spec b/OpenEXR.spec index c511e8e..4ee12e2 100644 --- a/OpenEXR.spec +++ b/OpenEXR.spec @@ -3,7 +3,7 @@ Name: OpenEXR Summary: A high dynamic-range (HDR) image file format Version: 2.3.0 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD URL: http://www.openexr.com/ @@ -14,6 +14,9 @@ Source0: https://github.com/%{project}/%{project}/releases/download/v%{version}/ # https://github.com/openexr/openexr/commit/5350d10ffc03c774e5cd574062297fc91001064d # https://github.com/openexr/openexr/commit/225ddb8777e75978b88c2d6311bb0cf94c0b6f22 Patch0: openexr-2.3.0-bigendian.patch +# https://github.com/openexr/openexr/issues/377 +# https://github.com/openexr/openexr/pull/443 +Patch1: openexr-2.3.0-tests.patch Obsoletes: openexr < %{version}-%{release} Provides: openexr = %{version}-%{release} @@ -57,6 +60,7 @@ Summary: Documentation and examples for building app that use %{name} %prep %setup -q -n openexr-%{version} %patch0 -p2 -b .bigendian +%patch1 -p2 -b .tests %build @@ -82,7 +86,7 @@ mv %{buildroot}%{_docdir}/openexr %{buildroot}%{_docdir}/%{name} %check export PKG_CONFIG_PATH="%{buildroot}%{_libdir}/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" test "$(pkg-config --modversion OpenEXR)" = "%{version}" -make %{?_smp_mflags} check ||: +make %{?_smp_mflags} check || { cat IlmImfTest/test-suite.log; /bin/true; } %files @@ -109,6 +113,9 @@ make %{?_smp_mflags} check ||: %changelog +* Thu Jul 18 2019 Dan Horák - 2.3.2-3 +- fix some tests + * Sat Jul 13 2019 Dan Horák - 2.3.2-2 - switch to upstream fix for big endians diff --git a/openexr-2.3.0-tests.patch b/openexr-2.3.0-tests.patch new file mode 100644 index 0000000..c074126 --- /dev/null +++ b/openexr-2.3.0-tests.patch @@ -0,0 +1,45 @@ +From 334324dcc1804defb1d91c021d229fe8754de8c7 Mon Sep 17 00:00:00 2001 +From: Peter Hillman +Date: Tue, 16 Jul 2019 20:16:09 +1200 +Subject: [PATCH 1/2] don't index empty array in testMultiPartSharedAttributes + +--- + OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp b/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp +index 29fe4561..c4eec4ab 100644 +--- a/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp ++++ b/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp +@@ -152,7 +152,7 @@ testMultiPartOutputFileForExpectedFailure (const vector
& headers, + try + { + remove(fn.c_str()); +- MultiPartOutputFile file(fn.c_str(), &headers[0],headers.size()); ++ MultiPartOutputFile file(fn.c_str(), (headers.size()>0 ? &headers[0] : NULL) , headers.size() ); + cerr << "ERROR -- " << failMessage << endl; + assert (false); + } + +From de72d9c8cb898790fe65c42921e9f0e995e8d212 Mon Sep 17 00:00:00 2001 +From: Peter Hillman +Date: Wed, 17 Jul 2019 17:46:20 +1200 +Subject: [PATCH 2/2] use headers.data() instead of &headers[0] + +--- + OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp b/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp +index c4eec4ab..460edc3f 100644 +--- a/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp ++++ b/OpenEXR/IlmImfTest/testMultiPartSharedAttributes.cpp +@@ -152,7 +152,7 @@ testMultiPartOutputFileForExpectedFailure (const vector
& headers, + try + { + remove(fn.c_str()); +- MultiPartOutputFile file(fn.c_str(), (headers.size()>0 ? &headers[0] : NULL) , headers.size() ); ++ MultiPartOutputFile file(fn.c_str(), headers.data() , headers.size() ); + cerr << "ERROR -- " << failMessage << endl; + assert (false); + }