unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 498c1c55154d56b2c55bf94b6b90f0b2f8b0404f 2582 bytes (raw)
name: tests/guix-shell.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 
# GNU Guix --- Functional package management for GNU
# Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
#
# 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 <http://www.gnu.org/licenses/>.

#
# Test the 'guix shell' alias.
#

guix shell --version

tmpdir="t-guix-shell-$$"
trap 'rm -r "$tmpdir"' EXIT
mkdir "$tmpdir"

guix shell --bootstrap --pure guile-bootstrap -- guile --version

# '--ad-hoc' is a thing of the past.
! guix shell --ad-hoc guile-bootstrap

# Honoring the local 'manifest.scm' file.
cat > "$tmpdir/manifest.scm" <<EOF
(specifications->manifest '("guile-bootstrap"))
EOF
profile1="$(cd "$tmpdir"; guix shell --bootstrap -- "$SHELL" -c 'echo $GUIX_ENVIRONMENT')"
profile2="$(guix shell --bootstrap guile-bootstrap -- "$SHELL" -c 'echo $GUIX_ENVIRONMENT')"
test -n "$profile1"
test "$profile1" = "$profile2"
rm "$tmpdir/manifest.scm"

if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
then
    # Compute the build environment for the initial GNU Make.
    guix shell --bootstrap --no-substitutes --search-paths --pure \
         -D -e '(@ (guix tests) gnu-make-for-tests)' > "$tmpdir/a"

    # Make sure bootstrap binaries are in the profile.
    profile=`grep "^export PATH" "$tmpdir/a" | sed -r 's|^.*="(.*)/bin"|\1|'`

    # Make sure the bootstrap binaries are all listed where they belong.
    grep -E "^export PATH=\"$profile/bin\""         "$tmpdir/a"
    grep -E "^export CPATH=\"$profile/include\""    "$tmpdir/a"
    grep -E "^export LIBRARY_PATH=\"$profile/lib\"" "$tmpdir/a"
    for dep in bootstrap-binaries-0 gcc-bootstrap-0 glibc-bootstrap-0
    do
	guix gc --references "$profile" | grep "$dep"
    done

    # 'make-boot0' itself must not be listed.
    ! guix gc --references "$profile" | grep make-boot0

    # Honoring the local 'guix.scm' file.
    echo '(@ (guix tests) gnu-make-for-tests)' > "$tmpdir/guix.scm"
    (cd "$tmpdir"; guix shell --bootstrap --search-paths --pure > "b")
    cmp "$tmpdir/a" "$tmpdir/b"
    rm "$tmpdir/guix.scm"
fi

debug log:

solving 498c1c5515 ...
found 498c1c5515 in https://yhetil.org/guix-patches/20211002102240.27815-4-ludo@gnu.org/
found f08637f7ff in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 f08637f7ff5fda1548bdbf3566ec6ad7e7fa2f81	tests/guix-shell.sh

applying [1/1] https://yhetil.org/guix-patches/20211002102240.27815-4-ludo@gnu.org/
diff --git a/tests/guix-shell.sh b/tests/guix-shell.sh
index f08637f7ff..498c1c5515 100644

Checking patch tests/guix-shell.sh...
Applied patch tests/guix-shell.sh cleanly.

index at:
100644 498c1c55154d56b2c55bf94b6b90f0b2f8b0404f	tests/guix-shell.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).