aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-environment-container.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-01 18:49:22 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-25 19:02:32 +0200
commit10208952eaf0834b9cdf341bc75463ed033af315 (patch)
treea951be3b2b1c7a388670f933468bd2b5522054fa /tests/guix-environment-container.sh
parent746584e0ca200e7bf51b139ceb36c19ea81d6ef1 (diff)
downloadguix-10208952eaf0834b9cdf341bc75463ed033af315.tar
guix-10208952eaf0834b9cdf341bc75463ed033af315.tar.gz
environment: Add tests for '--profile'.
This is a followup to a643deac2de81755a1843a3b41dd53857678bebc. * tests/guix-environment-container.sh, tests/guix-environment.sh: Add tests for '--profile'.
Diffstat (limited to 'tests/guix-environment-container.sh')
-rw-r--r--tests/guix-environment-container.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh
index f2d15c8d0c..2e238c501d 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -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")))'