From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:36226) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkZH1-0003vZ-Nr for guix-patches@gnu.org; Mon, 08 Jul 2019 15:26:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkZH0-0005e5-Nm for guix-patches@gnu.org; Mon, 08 Jul 2019 15:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50742) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkZH0-0005dx-KM for guix-patches@gnu.org; Mon, 08 Jul 2019 15:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkZH0-0003Hb-Eu for guix-patches@gnu.org; Mon, 08 Jul 2019 15:26:02 -0400 Subject: [bug#36477] [PATCH 25/31] gnu: libarchive: Fix cross-compilation. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20190708095913.3460-26-m.othacehe@gmail.com> References: <20190708095913.3460-1-m.othacehe@gmail.com> <20190708095913.3460-26-m.othacehe@gmail.com> Date: Mon, 08 Jul 2019 20:25:22 +0200 Message-ID: <87lfx8o031.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: Mathieu Othacehe , 36477@debbugs.gnu.org --=-=-= Content-Type: text/plain Mathieu Othacehe writes: > * gnu/packages/backup.scm (libarchive)[arguments]: Do not build and run tests > when cross-compiling. [...] > @@ -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)) When I think about it, gnu-build-system already sets #:tests? #f when cross-compiling. So this and similar changes can be rewritten to simply check the tests? variable: (replace 'check (lambda* (#:key (tests? #t) #:allow-other-keys) (if tests? ... (format #t "test suite not run~%")))) (obviously, you should check that this works instead of taking my word for it. But it looks cleaner this way. LGTM anyway.) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl0jipMACgkQoqBt8qM6 VPpNjwf/cE/lMgzZBdidR8JcwEUetZikxQq9l3PAxEmuIMiTIcvKSPx/81E5hHWI z8cIaSZSmlXZXSWHHZh4diIHYSpLmjfYdHJBJb+A/w3QgzL49GeIEkMoTJPFqale MPYNCTeyXMS6iKAY7b8bjqJQfstUSFkGHcswtCWCf1BvbnEdNkChp1hILD7ErsAy L2n2tTziGv+dqkWrb2EcpXzaEXyfpQ3Gse+51sjGmEaEx19VDjZYH6Dj4pUFhZe+ 2Pu3ff6yQN+ce0cZ4KBrY63IvIPB7ZIW7tb5vbGYbfBwvmJ8WnbXP2NIYdwSNjpH IqsLCc0+/ZH0ALR5fazBUxbE806mbQ== =Iulc -----END PGP SIGNATURE----- --=-=-=--