mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
environment: Add tests for '--profile'.
This is a followup to a643deac2d
.
* tests/guix-environment-container.sh, tests/guix-environment.sh: Add
tests for '--profile'.
This commit is contained in:
parent
746584e0ca
commit
10208952ea
2 changed files with 15 additions and 0 deletions
|
@ -44,6 +44,14 @@ else
|
|||
test $? = 42
|
||||
fi
|
||||
|
||||
# Try '--root' and '--profile'.
|
||||
root="$tmpdir/root"
|
||||
guix environment -C --ad-hoc --bootstrap guile-bootstrap -r "$root" -- guile --version
|
||||
guix environment -C -p "$root" --bootstrap -- guile --version
|
||||
path1=$(guix environment -C -p "$root" --bootstrap -- guile -c '(display (getenv "PATH"))')
|
||||
path2=$(guix environment -C --ad-hoc --bootstrap guile-bootstrap -- guile -c '(display (getenv "PATH"))')
|
||||
test "$path1" = "$path2"
|
||||
|
||||
# Make sure "localhost" resolves.
|
||||
guix environment --container --ad-hoc --bootstrap guile-bootstrap \
|
||||
-- guile -c '(exit (pair? (getaddrinfo "localhost" "80")))'
|
||||
|
|
|
@ -119,6 +119,13 @@ test `readlink "$gcroot"` = "$expected"
|
|||
guix environment --bootstrap -r "$gcroot" --ad-hoc guile-bootstrap \
|
||||
-- guile -c 1
|
||||
test `readlink "$gcroot"` = "$expected"
|
||||
|
||||
# Make sure '-p' works as expected.
|
||||
test $(guix environment -p "$gcroot" -- "$SHELL" -c 'echo $GUIX_ENVIRONMENT') = "$expected"
|
||||
paths1="$(guix environment -p "$gcroot" --search-paths)"
|
||||
paths2="$(guix environment --bootstrap --ad-hoc guile-bootstrap --search-paths)"
|
||||
test "$paths1" = "$paths2"
|
||||
|
||||
rm "$gcroot"
|
||||
|
||||
# Try '-r' with a relative file name.
|
||||
|
|
Loading…
Reference in a new issue