From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eooFO-00039e-2y for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eooFK-0002uY-Tc for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47420) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eooFK-0002uA-Pk for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eooFK-0006sA-7e for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:02 -0500 Subject: [bug#30572] [PATCH 1/7] tests: Add tests for "guix pack". Resent-Message-ID: From: Chris Marusich Date: Thu, 22 Feb 2018 11:35:22 +0100 Message-Id: <20180222103528.5108-1-cmmarusich@gmail.com> In-Reply-To: References: 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: 30572@debbugs.gnu.org Cc: Chris Marusich * Makefile.am (SH_TESTS): Add guix-pack.sh. * tests/guix-pack.sh: New file. --- Makefile.am | 1 + tests/guix-pack.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tests/guix-pack.sh diff --git a/Makefile.am b/Makefile.am index e2c940ca8..c4c37e327 100644 --- a/Makefile.am +++ b/Makefile.am @@ -372,6 +372,7 @@ SH_TESTS = \ tests/guix-download.sh \ tests/guix-gc.sh \ tests/guix-hash.sh \ + tests/guix-pack.sh \ tests/guix-package.sh \ tests/guix-package-net.sh \ tests/guix-system.sh \ diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh new file mode 100644 index 000000000..00c925666 --- /dev/null +++ b/tests/guix-pack.sh @@ -0,0 +1,43 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2018 Chris Marusich +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see . + +# +# Test the `guix pack' command-line utility. +# + +guix pack --version + +# Use --no-substitutes because we need to verify we can do this ourselves. +# Use --dry-run because it takes too long to actually build everything. +GUIX_BUILD_OPTIONS="--no-substitutes --dry-run" +export GUIX_BUILD_OPTIONS + +# Build a tarball. +guix pack coreutils + +# Build a tarball with a symlink. +guix pack -S /opt/gnu/bin=bin coreutils + +# Build a Docker image. +guix pack -f docker coreutils + +# Build a Docker image with a symlink. +guix pack -f docker -S /opt/gnu=/ coreutils + +# Build a tarball pack of cross-compiled software. +guix pack --target=arm-unknown-linux-gnueabihf coreutils -- 2.15.1