From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:55100) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkQRc-0005fY-Pd for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkQRb-0003Hg-GF for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:24 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49070) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkQRb-0003HW-B4 for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:23 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkQRb-0004wM-8B for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:23 -0400 Subject: [bug#36477] [PATCH 25/31] gnu: libarchive: Fix cross-compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Mon, 8 Jul 2019 11:59:07 +0200 Message-Id: <20190708095913.3460-26-m.othacehe@gmail.com> In-Reply-To: <20190708095913.3460-1-m.othacehe@gmail.com> References: <20190708095913.3460-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36477@debbugs.gnu.org Cc: Mathieu Othacehe * gnu/packages/backup.scm (libarchive)[arguments]: Do not build and run tests when cross-compiling. --- gnu/packages/backup.scm | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 0bd894f958..783ca7a674 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; Copyright © 2019 Alex Vong +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -226,17 +227,25 @@ 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. - ;; - ;; 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"))) + ,@(if (%current-target-system) + '((lambda _ + #t)) + '((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. + ;; + ;; 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"))))) (add-after 'install 'add--L-in-libarchive-pc (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- 2.17.1