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>
This commit is contained in:
parent
d7ab54cdb1
commit
b8df15b748
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user