tests: add fetchTarball test for symlink temporary directories
Change-Id: I6a6a6964dfe85b5ee4f66b8c442fe448c7c5c87c
This commit is contained in:
@@ -30,6 +30,14 @@ test_tarball() {
|
||||
# Do not re-fetch paths already present
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTarball { url = \"file:///does-not-exist/must-remain-unused/$tarball\"; sha256 = \"$hash\"; })"
|
||||
|
||||
# Regression test: Ensure tarballs can be unpacked when the
|
||||
# temporary directory is a symbolic link.
|
||||
(
|
||||
export HOME=$(mktemp -d)
|
||||
ln -sf "$TMPDIR" "$HOME/tmp"
|
||||
nix-build -o "$TEST_ROOT/result" --temp-dir "$HOME/tmp" -E "import (fetchTarball \"file://$tarball\")"
|
||||
)
|
||||
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTree \"file://$tarball\")"
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTree { type = \"tarball\"; url = \"file://$tarball\"; })"
|
||||
nix-build -o $TEST_ROOT/result -E "import (fetchTree { type = \"tarball\"; url = \"file://$tarball\"; narHash = \"$hash\"; })"
|
||||
|
||||
Reference in New Issue
Block a user