[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/13: gnu: exiv2: Fix test failure on ppc64le and aarch64.
From: |
guix-commits |
Subject: |
13/13: gnu: exiv2: Fix test failure on ppc64le and aarch64. |
Date: |
Mon, 1 Aug 2022 08:11:21 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit b8df15b748024128e09cebb4d7ebae42be5df788
Author: Marcel van der Boom <marcel@van-der-boom.nl>
AuthorDate: Mon Jul 25 21:47:33 2022 +0200
gnu: exiv2: Fix test failure on ppc64le and aarch64.
ppc64 and aarch64 do not raise exception and thus output and exit code
for test is different.
See:
https://github.com/Exiv2/exiv2/issues/365 and
https://github.com/Exiv2/exiv2/issues/933
* gnu/packages/image.scm (exiv2)[arguments]: Add 'adjust-tests' phase.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/image.scm | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 4b31ba41a0..1b88c7be83 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1346,7 +1346,7 @@ channels.")
(base32 "1qm6bvj28l42km009nc60gffn1qhngc0m2wjlhf90si3mcc8d99m"))))
(build-system cmake-build-system)
(arguments
- '(#:test-target "tests"
+ `(#:test-target "tests"
#:configure-flags (list "-DEXIV2_BUILD_UNIT_TESTS=ON"
;; darktable needs BMFF to support
;; CR3 files.
@@ -1357,7 +1357,19 @@ channels.")
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib")))
- (for-each delete-file (find-files lib "\\.a$"))))))))
+ (for-each delete-file (find-files lib "\\.a$")))))
+
+ ,@(if (or (target-ppc64le?) (target-aarch64?))
+ '((add-after 'unpack 'adjust-tests
+ (lambda _
+ ;; Adjust test on ppc64 and aarch64, where no exception
+ ;; is raised and thus the return value is different. See
+ ;; <https://github.com/Exiv2/exiv2/issues/365> and
+ ;; <https://github.com/Exiv2/exiv2/issues/933>.
+ (substitute*
"tests/bugfixes/github/test_CVE_2018_12265.py"
+ (("\\$uncaught_exception
\\$addition_overflow_message\n") "")
+ (("retval = \\[1\\]") "retval = [0]")))))
+ '()))))
(propagated-inputs
(list expat zlib))
(native-inputs
- branch master updated (dc3ad40c6b -> b8df15b748), guix-commits, 2022/08/01
- 03/13: gnu: Add libsep, guix-commits, 2022/08/01
- 05/13: gnu: Add cardpeek., guix-commits, 2022/08/01
- 06/13: gnu: xdot: Build with librsvg-for-system., guix-commits, 2022/08/01
- 13/13: gnu: exiv2: Fix test failure on ppc64le and aarch64.,
guix-commits <=
- 01/13: download: 'url-fetch' closes its HTTP/HTTPS port., guix-commits, 2022/08/01
- 02/13: gnu: gnutls: Add 3.7.7., guix-commits, 2022/08/01
- 04/13: gnu: python-sep: Update to 1.2.1, guix-commits, 2022/08/01
- 07/13: gnu: guile-lens: Fix build., guix-commits, 2022/08/01
- 08/13: gnu: hdf5-1.8: Add missing comma to linker flag., guix-commits, 2022/08/01
- 09/13: gnu: Add comma after “i.e.” in descriptions., guix-commits, 2022/08/01
- 11/13: services: opensmtpd: Make commands setgid to "smtpq" by default., guix-commits, 2022/08/01
- 12/13: gnu: Add python-biblib., guix-commits, 2022/08/01
- 10/13: gnu: tractor: Update to 3.14., guix-commits, 2022/08/01