[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/11: environment: Add tests for '--profile'.
From: |
guix-commits |
Subject: |
05/11: environment: Add tests for '--profile'. |
Date: |
Mon, 25 Oct 2021 14:13:28 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 10208952eaf0834b9cdf341bc75463ed033af315
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 1 18:49:22 2021 +0200
environment: Add tests for '--profile'.
This is a followup to a643deac2de81755a1843a3b41dd53857678bebc.
* tests/guix-environment-container.sh, tests/guix-environment.sh: Add
tests for '--profile'.
---
tests/guix-environment-container.sh | 8 ++++++++
tests/guix-environment.sh | 7 +++++++
2 files changed, 15 insertions(+)
diff --git a/tests/guix-environment-container.sh
b/tests/guix-environment-container.sh
index f2d15c8..2e238c5 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")))'
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index afadcbe..f4fc2e3 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -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.
- branch master updated (e4276fc -> 4aa41a3), guix-commits, 2021/10/25
- 01/11: packages: Add 'package-development-inputs'., guix-commits, 2021/10/25
- 02/11: profiles: Add 'package->development-manifest'., guix-commits, 2021/10/25
- 03/11: Add 'guix shell'., guix-commits, 2021/10/25
- 04/11: shell: By default load the local 'manifest.scm' or 'guix.scm' file., guix-commits, 2021/10/25
- 08/11: environment: Autoload some modules., guix-commits, 2021/10/25
- 07/11: environment: Do not connect to the daemon when '--profile' is used., guix-commits, 2021/10/25
- 05/11: environment: Add tests for '--profile'.,
guix-commits <=
- 10/11: shell: Maintain a profile cache., guix-commits, 2021/10/25
- 11/11: news: Add entry about "guix shell"., guix-commits, 2021/10/25
- 06/11: environment: Skip derivation computation when '--profile' is used., guix-commits, 2021/10/25
- 09/11: cache: Gracefully handle non-existent cache., guix-commits, 2021/10/25