aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-environment-container.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-08-17 15:40:49 +0200
committerLudovic Courtès <ludo@gnu.org>2019-08-17 16:23:05 +0200
commit75a6f66815db811cc41aadbe93033a6efd3ad62f (patch)
tree7a4313c883bad3c09e1771a00b419a1c594a47c5 /tests/guix-environment-container.sh
parent37592014e13abead7a691d0dcb5918d1a10f5cd6 (diff)
downloadpatches-75a6f66815db811cc41aadbe93033a6efd3ad62f.tar
patches-75a6f66815db811cc41aadbe93033a6efd3ad62f.tar.gz
tests: Move 'guix environment -C --no-cwd' test where it belongs.
This ensures that this test is skipped in contexts where user namespaces are not supported, instead of failing. This is a followup to commit b6dc08393e6a8313b88ce422fc3c1e4e9c0efc6f. * tests/guix-environment.sh: Move '--container --no-cwd' test to... * tests/guix-environment-container.sh: ... here.
Diffstat (limited to 'tests/guix-environment-container.sh')
-rw-r--r--tests/guix-environment-container.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh
index 78507f76c0..32a5ba1f97 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -144,6 +144,13 @@ HOME="$tmpdir" guix environment --bootstrap --container --user=foognu \
--share="$tmpdir/umock" \
-- guile -c "$usertest"
+# if not sharing CWD, chdir home
+(
+ cd "$tmpdir" \
+ && guix environment --bootstrap --container --no-cwd --user=foo \
+ --ad-hoc guile-bootstrap --pure \
+ -- /bin/sh -c 'test $(pwd) == "/home/foo" -a ! -d '"$tmpdir"
+)
# Check the exit code.