2008-06-09 16:52:45 +03:00
|
|
|
source common.sh
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
|
2012-09-12 02:14:15 +03:00
|
|
|
outPath=$(nix-build dependencies.nix --no-out-link)
|
2008-06-09 16:52:45 +03:00
|
|
|
|
2011-10-11 00:32:34 +03:00
|
|
|
nix-store --export $outPath > $TEST_ROOT/exp
|
2008-06-09 16:52:45 +03:00
|
|
|
|
2011-10-11 00:32:34 +03:00
|
|
|
nix-store --export $(nix-store -qR $outPath) > $TEST_ROOT/exp_all
|
2008-06-09 16:52:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
|
2011-10-11 00:32:34 +03:00
|
|
|
if nix-store --import < $TEST_ROOT/exp; then
|
2008-06-09 16:52:45 +03:00
|
|
|
echo "importing a non-closure should fail"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
|
2011-10-11 00:32:34 +03:00
|
|
|
nix-store --import < $TEST_ROOT/exp_all
|
2008-06-09 16:52:45 +03:00
|
|
|
|
2011-10-11 00:32:34 +03:00
|
|
|
nix-store --export $(nix-store -qR $outPath) > $TEST_ROOT/exp_all2
|
2008-06-09 16:52:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
|
|
|
|
# Regression test: the derivers in exp_all2 are empty, which shouldn't
|
|
|
|
# cause a failure.
|
2011-10-11 00:32:34 +03:00
|
|
|
nix-store --import < $TEST_ROOT/exp_all2
|