guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#30572] [PATCH 2/7] tests: Add tests for "guix pack".


From: Ludovic Courtès
Subject: [bug#30572] [PATCH 2/7] tests: Add tests for "guix pack".
Date: Thu, 22 Mar 2018 10:22:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello Chris!

Chris Marusich <address@hidden> skribis:

> From 4385831672436b2339f7a5da9f45f429dc3178dc Mon Sep 17 00:00:00 2001
> From: Chris Marusich <address@hidden>
> 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) <inputs>: Add util-linux.

Awesome!

[...]

> +if is_available chroot && is_available unshare; then
> +    # Verify we can extract and use it.
> +    test_directory="`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 ‘unshare’ bit in the conditional.

But I’m nitpicking, please push, with or without this change!  :-)

Thanks for your patience,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]