[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: tests: Move 'guix environment -C --no-cwd' test where it belongs.
From: |
guix-commits |
Subject: |
02/04: tests: Move 'guix environment -C --no-cwd' test where it belongs. |
Date: |
Sat, 17 Aug 2019 10:23:41 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 75a6f66815db811cc41aadbe93033a6efd3ad62f
Author: Ludovic Courtès <address@hidden>
Date: Sat Aug 17 15:40:49 2019 +0200
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.
---
tests/guix-environment-container.sh | 7 +++++++
tests/guix-environment.sh | 8 --------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/tests/guix-environment-container.sh
b/tests/guix-environment-container.sh
index 78507f7..32a5ba1 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.
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 5a5a69d..a670db3 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -84,14 +84,6 @@ echo "(use-modules (guix profiles) (gnu packages bootstrap))
guix environment --bootstrap --manifest=$tmpdir/manifest.scm --pure \
-- "$SHELL" -c 'test -f "$GUIX_ENVIRONMENT/bin/guile"'
-# 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"
-)
-
# Make sure '-r' works as expected.
rm -f "$gcroot"
expected="`guix environment --bootstrap --ad-hoc guile-bootstrap \