lix/tests/recursive.sh

23 lines
652 B
Bash
Raw Normal View History

2019-11-04 13:23:58 +01:00
source common.sh
# FIXME
if [[ $(uname) != Linux ]]; then skipTest "Not running Linux"; fi
enableFeatures 'recursive-nix'
restartDaemon
2019-11-04 13:23:58 +01:00
clearStore
2020-06-25 18:26:34 +02:00
rm -f $TEST_ROOT/result
export unreachable=$(nix store add-path ./recursive.sh)
2019-11-04 13:23:58 +01:00
NIX_BIN_DIR=$(dirname $(type -p nix)) nix --extra-experimental-features 'nix-command recursive-nix' build -o $TEST_ROOT/result -L --impure --file ./recursive.nix
2019-11-04 13:23:58 +01:00
[[ $(cat $TEST_ROOT/result/inner1) =~ blaat ]]
# Make sure the recursively created paths are in the closure.
nix path-info -r $TEST_ROOT/result | grep foobar
nix path-info -r $TEST_ROOT/result | grep fnord
nix path-info -r $TEST_ROOT/result | grep inner1