From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eywRA-0002GK-2R for guix-patches@gnu.org; Thu, 22 Mar 2018 05:23:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eywR4-00061K-0i for guix-patches@gnu.org; Thu, 22 Mar 2018 05:23:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38863) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eywR3-00061E-SJ for guix-patches@gnu.org; Thu, 22 Mar 2018 05:23:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eywR3-0008Vj-N5 for guix-patches@gnu.org; Thu, 22 Mar 2018 05:23:01 -0400 Subject: [bug#30572] [PATCH 2/7] tests: Add tests for "guix pack". Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180222102933.4978-1-cmmarusich@gmail.com> <20180315040915.5556-1-cmmarusich@gmail.com> <20180315040915.5556-3-cmmarusich@gmail.com> <20180316220732.19c2375a@scratchpost.org> <87a7v6pnmm.fsf@gnu.org> <87y3im5b7u.fsf@gmail.com> <87h8pa59yn.fsf@gmail.com> <87in9od8nv.fsf@gmail.com> Date: Thu, 22 Mar 2018 10:22:15 +0100 In-Reply-To: <87in9od8nv.fsf@gmail.com> (Chris Marusich's message of "Thu, 22 Mar 2018 05:41:08 +0100") Message-ID: <87a7v0lb20.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Chris Marusich Cc: 30572@debbugs.gnu.org Hello Chris! Chris Marusich skribis: > From 4385831672436b2339f7a5da9f45f429dc3178dc Mon Sep 17 00:00:00 2001 > From: Chris Marusich > Date: Sun, 11 Mar 2018 01:13:01 +0100 > Subject: [PATCH 1/6] tests: Add tests for "guix pack". > > * guix/scripts/pack.scm (bootstrap-xz): New variable. > (%options) <--bootstrap>: New option. > (show-help): Document the new --bootstrap option. > (guix-pack): When --bootstrap is specified, use the bootstrap Guile, > tar, and xz to build the pack, and do not use any profile hooks or > locales. > * doc/guix.texi (Invoking guix pull): Document the new --bootstrap > option. > * tests/guix-pack.sh: New file. > * Makefile.am (SH_TESTS): Add guix-pack.sh. > * gnu/packages/package-management.scm (guix) : Add util-linux. Awesome! [...] > +if is_available chroot && is_available unshare; then > + # Verify we can extract and use it. > + test_directory=3D"`mktemp -d`" > + trap 'rm -rf "$test_directory"' EXIT > + cd "$test_directory" > + tar -xf "$the_pack" > + unshare -r chroot . /opt/gnu/bin/guile --version > + cd - > +else > + echo "warning: skipping pack verification because chroot or unshare = is unavailable" >&2 > +fi I just realized we could unconditionally extra the pack, do test -x "$test_directory/opt/gnu/bin/guile" and keep only the =E2=80=98unshare=E2=80=99 bit in the conditional. But I=E2=80=99m nitpicking, please push, with or without this change! :-) Thanks for your patience, Ludo=E2=80=99.