Skip to content
Snippets Groups Projects
Commit f459ca54 authored by Matthew Kenigsberg's avatar Matthew Kenigsberg
Browse files

rename run to shell in tests

parent 5d8504b9
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ nix_tests = \ ...@@ -21,7 +21,7 @@ nix_tests = \
fetchGitSubmodules.sh \ fetchGitSubmodules.sh \
fetchMercurial.sh \ fetchMercurial.sh \
signing.sh \ signing.sh \
run.sh \ shell.sh \
brotli.sh \ brotli.sh \
pure-eval.sh \ pure-eval.sh \
check.sh \ check.sh \
......
File moved
...@@ -3,8 +3,8 @@ source common.sh ...@@ -3,8 +3,8 @@ source common.sh
clearStore clearStore
clearCache clearCache
nix run -f run.nix hello -c hello | grep 'Hello World' nix shell -f shell-hello.nix hello -c hello | grep 'Hello World'
nix run -f run.nix hello -c hello NixOS | grep 'Hello NixOS' nix shell -f shell-hello.nix hello -c hello NixOS | grep 'Hello NixOS'
if ! canUseSandbox; then exit; fi if ! canUseSandbox; then exit; fi
...@@ -13,15 +13,15 @@ rm -rf $TEST_ROOT/store0 ...@@ -13,15 +13,15 @@ rm -rf $TEST_ROOT/store0
clearStore clearStore
path=$(nix eval --raw -f run.nix hello) path=$(nix eval --raw -f shell-hello.nix hello)
# Note: we need the sandbox paths to ensure that the shell is # Note: we need the sandbox paths to ensure that the shell is
# visible in the sandbox. # visible in the sandbox.
nix run --sandbox-build-dir /build-tmp \ nix shell --sandbox-build-dir /build-tmp \
--sandbox-paths '/nix? /bin? /lib? /lib64? /usr?' \ --sandbox-paths '/nix? /bin? /lib? /lib64? /usr?' \
--store $TEST_ROOT/store0 -f run.nix hello -c hello | grep 'Hello World' --store $TEST_ROOT/store0 -f shell-hello.nix hello -c hello | grep 'Hello World'
path2=$(nix run --sandbox-paths '/nix? /bin? /lib? /lib64? /usr?' --store $TEST_ROOT/store0 -f run.nix hello -c $SHELL -c 'type -p hello') path2=$(nix shell --sandbox-paths '/nix? /bin? /lib? /lib64? /usr?' --store $TEST_ROOT/store0 -f shell-hello.nix hello -c $SHELL -c 'type -p hello')
[[ $path/bin/hello = $path2 ]] [[ $path/bin/hello = $path2 ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment