mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
tests: Fix (getcwd) failing without chroot.
In case chroot and unshare are not available, $test_directory remains the
current directory. When the directory gets removed (line 119), ‘guix pack’ on
line 121 fails due to (getcwd) failing with ENOENT.
The bug was already present in 272c070962.
* tests/guix-pack.sh: Always do “cd -”.
Change-Id: Ib02bf3714f0c6706b5e759dbb28cf86edf0f1317
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #6013
This commit is contained in:
committed by
Ludovic Courtès
parent
dab3b8f64c
commit
8813f8ba34
@@ -85,10 +85,10 @@ is_available () {
|
|||||||
if is_available chroot && is_available unshare && unshare -r true; then
|
if is_available chroot && is_available unshare && unshare -r true; then
|
||||||
# Verify we can use what we built.
|
# Verify we can use what we built.
|
||||||
unshare -r chroot . /opt/gnu/bin/guile --version
|
unshare -r chroot . /opt/gnu/bin/guile --version
|
||||||
cd -
|
|
||||||
else
|
else
|
||||||
echo "warning: skipped some verification because chroot or unshare is unavailable" >&2
|
echo "warning: skipped some verification because chroot or unshare is unavailable" >&2
|
||||||
fi
|
fi
|
||||||
|
cd -
|
||||||
|
|
||||||
# For the tests that build Docker images below, we currently have to use
|
# For the tests that build Docker images below, we currently have to use
|
||||||
# --dry-run because if we don't, there are only two possible cases:
|
# --dry-run because if we don't, there are only two possible cases:
|
||||||
|
|||||||
Reference in New Issue
Block a user