tests/run.sh: Fix /build conflict when building in a sandbox

https://hydra.nixos.org/build/64519355
This commit is contained in:
Eelco Dolstra 2017-11-21 19:43:12 +01:00
parent d7da6c9ea9
commit 0fc3e581e0
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -17,7 +17,9 @@ if [[ $(uname) = Linux ]]; then
# Note: we need the sandbox paths to ensure that the shell is
# visible in the sandbox.
nix run --sandbox-paths '/nix? /bin? /lib? /usr?' --store $TEST_ROOT/store0 -f run.nix hello -c hello | grep 'Hello World'
nix run --sandbox-build-dir /build-tmp \
--sandbox-paths '/nix? /bin? /lib? /usr?' \
--store $TEST_ROOT/store0 -f run.nix hello -c hello | grep 'Hello World'
path2=$(nix run --sandbox-paths '/nix? /bin? /lib? /usr?' --store $TEST_ROOT/store0 -f run.nix hello -c $SHELL -c 'type -p hello')