mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
shellcheck fix: tests/functional/eval-store.sh
This commit is contained in:
parent
dc69e2e520
commit
b8c24cdaef
2 changed files with 11 additions and 11 deletions
|
|
@ -107,7 +107,6 @@
|
||||||
excludes = [
|
excludes = [
|
||||||
# We haven't linted these files yet
|
# We haven't linted these files yet
|
||||||
''^tests/functional/dump-db\.sh$''
|
''^tests/functional/dump-db\.sh$''
|
||||||
''^tests/functional/eval-store\.sh$''
|
|
||||||
''^tests/functional/export-graph\.sh$''
|
''^tests/functional/export-graph\.sh$''
|
||||||
''^tests/functional/export\.sh$''
|
''^tests/functional/export\.sh$''
|
||||||
''^tests/functional/extra-sandbox-profile\.sh$''
|
''^tests/functional/extra-sandbox-profile\.sh$''
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ TODO_NixOS
|
||||||
|
|
||||||
# Using `--eval-store` with the daemon will eventually copy everything
|
# Using `--eval-store` with the daemon will eventually copy everything
|
||||||
# to the build store, invalidating most of the tests here
|
# to the build store, invalidating most of the tests here
|
||||||
|
# shellcheck disable=SC1111
|
||||||
needLocalStore "“--eval-store” doesn't achieve much with the daemon"
|
needLocalStore "“--eval-store” doesn't achieve much with the daemon"
|
||||||
|
|
||||||
eval_store=$TEST_ROOT/eval-store
|
eval_store=$TEST_ROOT/eval-store
|
||||||
|
|
@ -15,7 +16,7 @@ rm -rf "$eval_store"
|
||||||
|
|
||||||
nix build -f dependencies.nix --eval-store "$eval_store" -o "$TEST_ROOT/result"
|
nix build -f dependencies.nix --eval-store "$eval_store" -o "$TEST_ROOT/result"
|
||||||
[[ -e $TEST_ROOT/result/foobar ]]
|
[[ -e $TEST_ROOT/result/foobar ]]
|
||||||
if [[ ! -n "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
|
if [[ -z "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
|
||||||
# Resolved CA derivations are written to store for building
|
# Resolved CA derivations are written to store for building
|
||||||
#
|
#
|
||||||
# TODO when we something more systematic
|
# TODO when we something more systematic
|
||||||
|
|
@ -23,35 +24,35 @@ if [[ ! -n "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
|
||||||
# between scratch storage for building and the final destination
|
# between scratch storage for building and the final destination
|
||||||
# store, we'll be able to make this unconditional again -- resolved
|
# store, we'll be able to make this unconditional again -- resolved
|
||||||
# derivations should only appear in the scratch store.
|
# derivations should only appear in the scratch store.
|
||||||
(! ls $NIX_STORE_DIR/*.drv)
|
(! ls "$NIX_STORE_DIR"/*.drv)
|
||||||
fi
|
fi
|
||||||
ls $eval_store/nix/store/*.drv
|
ls "$eval_store"/nix/store/*.drv
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
rm -rf "$eval_store"
|
rm -rf "$eval_store"
|
||||||
|
|
||||||
nix-instantiate dependencies.nix --eval-store "$eval_store"
|
nix-instantiate dependencies.nix --eval-store "$eval_store"
|
||||||
(! ls $NIX_STORE_DIR/*.drv)
|
(! ls "$NIX_STORE_DIR"/*.drv)
|
||||||
ls $eval_store/nix/store/*.drv
|
ls "$eval_store"/nix/store/*.drv
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
rm -rf "$eval_store"
|
rm -rf "$eval_store"
|
||||||
|
|
||||||
nix-build dependencies.nix --eval-store "$eval_store" -o "$TEST_ROOT/result"
|
nix-build dependencies.nix --eval-store "$eval_store" -o "$TEST_ROOT/result"
|
||||||
[[ -e $TEST_ROOT/result/foobar ]]
|
[[ -e $TEST_ROOT/result/foobar ]]
|
||||||
if [[ ! -n "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
|
if [[ -z "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
|
||||||
# See above
|
# See above
|
||||||
(! ls $NIX_STORE_DIR/*.drv)
|
(! ls "$NIX_STORE_DIR"/*.drv)
|
||||||
fi
|
fi
|
||||||
ls $eval_store/nix/store/*.drv
|
ls "$eval_store"/nix/store/*.drv
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
rm -rf "$eval_store"
|
rm -rf "$eval_store"
|
||||||
|
|
||||||
# Confirm that import-from-derivation builds on the build store
|
# Confirm that import-from-derivation builds on the build store
|
||||||
[[ $(nix eval --eval-store "$eval_store?require-sigs=false" --impure --raw --file ./ifd.nix) = hi ]]
|
[[ $(nix eval --eval-store "$eval_store?require-sigs=false" --impure --raw --file ./ifd.nix) = hi ]]
|
||||||
ls $NIX_STORE_DIR/*dependencies-top/foobar
|
ls "$NIX_STORE_DIR"/*dependencies-top/foobar
|
||||||
(! ls $eval_store/nix/store/*dependencies-top/foobar)
|
(! ls "$eval_store"/nix/store/*dependencies-top/foobar)
|
||||||
|
|
||||||
# Can't write .drv by default
|
# Can't write .drv by default
|
||||||
(! nix-instantiate dependencies.nix --eval-store "dummy://")
|
(! nix-instantiate dependencies.nix --eval-store "dummy://")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue