summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/guix-environment-container.sh7
-rw-r--r--tests/guix-environment.sh8
2 files changed, 7 insertions, 8 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.
 
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 5a5a69d58c..a670db36be 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 \