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 b6dc08393e
.
* tests/guix-environment.sh: Move '--container --no-cwd' test to...
* tests/guix-environment-container.sh: ... here.
This commit is contained in:
parent
37592014e1
commit
75a6f66815
|
@ -144,6 +144,13 @@ HOME="$tmpdir" guix environment --bootstrap --container --user=foognu \
|
||||||
--share="$tmpdir/umock" \
|
--share="$tmpdir/umock" \
|
||||||
-- guile -c "$usertest"
|
-- 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.
|
# Check the exit code.
|
||||||
|
|
||||||
|
|
|
@ -84,14 +84,6 @@ echo "(use-modules (guix profiles) (gnu packages bootstrap))
|
||||||
guix environment --bootstrap --manifest=$tmpdir/manifest.scm --pure \
|
guix environment --bootstrap --manifest=$tmpdir/manifest.scm --pure \
|
||||||
-- "$SHELL" -c 'test -f "$GUIX_ENVIRONMENT/bin/guile"'
|
-- "$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.
|
# Make sure '-r' works as expected.
|
||||||
rm -f "$gcroot"
|
rm -f "$gcroot"
|
||||||
expected="`guix environment --bootstrap --ad-hoc guile-bootstrap \
|
expected="`guix environment --bootstrap --ad-hoc guile-bootstrap \
|
||||||
|
|
Loading…
Reference in New Issue