[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/17: gnu: libarchive: Fix cross-compilation.
From: |
guix-commits |
Subject: |
14/17: gnu: libarchive: Fix cross-compilation. |
Date: |
Mon, 2 Sep 2019 11:21:53 -0400 (EDT) |
mothacehe pushed a commit to branch core-updates-next
in repository guix.
commit 351a0f69ce5f246f2075118cdd30e4fb78ada7a2
Author: Mathieu Othacehe <address@hidden>
Date: Fri Jul 5 17:46:34 2019 +0200
gnu: libarchive: Fix cross-compilation.
* gnu/packages/backup.scm (libarchive)[arguments]: Do not build and run
tests
when cross-compiling.
---
gnu/packages/backup.scm | 47 +++++++++++++++++++++++++++++------------------
1 file changed, 29 insertions(+), 18 deletions(-)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index a92c8c9..512882c 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <address@hidden>
;;; Copyright © 2019 Alex Vong <address@hidden>
;;; Copyright © 2019 Marius Bakke <address@hidden>
+;;; Copyright © 2019 Mathieu Othacehe <address@hidden>
;;;
;;; 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")))
#t))
(replace 'check
- (lambda _
- ;; XXX: The test_owner_parse, test_read_disk, and
- ;; test_write_disk_lookup tests expect user 'root' to exist, but
- ;; the chroot's /etc/passwd doesn't have it. Turn off those
tests.
- ;;
- ;; XXX: Adjust test that fails with zstd 1.4.1 because the default
- ;; options compresses two bytes better than this test expects.
- ;; https://github.com/libarchive/libarchive/issues/1226
- (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.
- (invoke "make" "libarchive_test" "bsdcpio_test" "bsdtar_test")
- ;; XXX: This glob disables too much.
- (invoke "./libarchive_test" "^test_*_disk*")
- (invoke "./bsdcpio_test" "^test_owner_parse")
- (invoke "./bsdtar_test")))
+ (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (if tests?
+ ;; XXX: The test_owner_parse, test_read_disk, and
+ ;; test_write_disk_lookup tests expect user 'root' to
+ ;; exist, but the chroot's /etc/passwd doesn't have
+ ;; it. Turn off those tests.
+ ;;
+ ;; XXX: Adjust test that fails with zstd 1.4.1
+ ;; because the default options compresses two bytes
+ ;; better than this test expects.
+ ;; 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.
+ (invoke "make"
+ "libarchive_test"
+ "bsdcpio_test"
+ "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
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- branch core-updates-next updated (45e0456 -> c249682), guix-commits, 2019/09/02
- 01/17: gnu: perl: Fix cross-compilation., guix-commits, 2019/09/02
- 04/17: gnu: tk: Fix cross-compilation., guix-commits, 2019/09/02
- 05/17: gnu: libxslt: Fix cross-compilation., guix-commits, 2019/09/02
- 02/17: gnu: python: Fix cross compilation., guix-commits, 2019/09/02
- 06/17: gnu: xorg: Fix cross-compilation of multiple packages., guix-commits, 2019/09/02
- 08/17: gnu: http-parser: Fix cross-compilation., guix-commits, 2019/09/02
- 12/17: gnu: help2man: Fix cross-compilation., guix-commits, 2019/09/02
- 14/17: gnu: libarchive: Fix cross-compilation.,
guix-commits <=
- 03/17: gnu: tcl: Fix cross-compilation., guix-commits, 2019/09/02
- 09/17: gnu: libgit2: Fix cross compilation., guix-commits, 2019/09/02
- 11/17: gnu: mit-krb5: Fix cross-compilation., guix-commits, 2019/09/02
- 07/17: gnu: python: Further cross-compilation fixes., guix-commits, 2019/09/02
- 15/17: gnu: tcsh: Fix cross-compilation., guix-commits, 2019/09/02
- 16/17: gnu: pkg-config: Fix cross-compilation., guix-commits, 2019/09/02
- 10/17: gnu: ath9k-htc-firmware: Fix cross compilation., guix-commits, 2019/09/02
- 13/17: gnu: xmlto: Fix cross-compilation., guix-commits, 2019/09/02
- 17/17: gnu: alsa-utils: Fix cross-compilation., guix-commits, 2019/09/02