mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: libarchive: Fix cross-compilation.
* gnu/packages/backup.scm (libarchive)[arguments]: Do not build and run tests when cross-compiling.
This commit is contained in:
parent
1475554147
commit
5fd395db3f
1 changed files with 28 additions and 17 deletions
|
@ -14,6 +14,7 @@
|
||||||
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
|
;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
|
||||||
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
|
||||||
|
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -230,24 +231,34 @@ backups (called chunks) to allow easy burning to CD/DVD.")
|
||||||
(("/bin/pwd") (which "pwd")))
|
(("/bin/pwd") (which "pwd")))
|
||||||
#t))
|
#t))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda* (#:key (tests? #t) #:allow-other-keys)
|
||||||
;; XXX: The test_owner_parse, test_read_disk, and
|
(if tests?
|
||||||
;; test_write_disk_lookup tests expect user 'root' to exist, but
|
;; XXX: The test_owner_parse, test_read_disk, and
|
||||||
;; the chroot's /etc/passwd doesn't have it. Turn off those tests.
|
;; test_write_disk_lookup tests expect user 'root' to
|
||||||
;;
|
;; exist, but the chroot's /etc/passwd doesn't have
|
||||||
;; XXX: Adjust test that fails with zstd 1.4.1 because the default
|
;; it. Turn off those tests.
|
||||||
;; options compresses two bytes better than this test expects.
|
;;
|
||||||
;; https://github.com/libarchive/libarchive/issues/1226
|
;; XXX: Adjust test that fails with zstd 1.4.1
|
||||||
(substitute* "libarchive/test/test_write_filter_zstd.c"
|
;; because the default options compresses two bytes
|
||||||
(("compression-level\", \"6\"")
|
;; better than this test expects.
|
||||||
"compression-level\", \"7\""))
|
;; https://github.com/libarchive/libarchive/issues/1226
|
||||||
|
(begin
|
||||||
|
(substitute* "libarchive/test/test_write_filter_zstd.c"
|
||||||
|
(("compression-level\", \"6\"")
|
||||||
|
"compression-level\", \"7\""))
|
||||||
|
|
||||||
;; The tests allow one to disable tests matching a globbing pattern.
|
;; The tests allow one to disable tests matching a globbing pattern.
|
||||||
(invoke "make" "libarchive_test" "bsdcpio_test" "bsdtar_test")
|
(invoke "make"
|
||||||
;; XXX: This glob disables too much.
|
"libarchive_test"
|
||||||
(invoke "./libarchive_test" "^test_*_disk*")
|
"bsdcpio_test"
|
||||||
(invoke "./bsdcpio_test" "^test_owner_parse")
|
"bsdtar_test")
|
||||||
(invoke "./bsdtar_test")))
|
|
||||||
|
;; XXX: This glob disables too much.
|
||||||
|
(invoke "./libarchive_test" "^test_*_disk*")
|
||||||
|
(invoke "./bsdcpio_test" "^test_owner_parse")
|
||||||
|
(invoke "./bsdtar_test"))
|
||||||
|
;; Tests may be disabled if cross-compiling.
|
||||||
|
(format #t "Test suite not run.~%"))))
|
||||||
(add-after 'install 'add--L-in-libarchive-pc
|
(add-after 'install 'add--L-in-libarchive-pc
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
|
Loading…
Reference in a new issue