forked from lix-project/lix
* Test nix-store --add' and
nix-store -q --hash'.
This commit is contained in:
parent
30d051ff14
commit
ea9c35d3cc
|
@ -13,10 +13,10 @@ fallback.sh: fallback.nix
|
||||||
gc-concurrent.sh: gc-concurrent.nix gc-concurrent2.nix
|
gc-concurrent.sh: gc-concurrent.nix gc-concurrent2.nix
|
||||||
user-envs.sh: user-envs.nix
|
user-envs.sh: user-envs.nix
|
||||||
|
|
||||||
TESTS = init.sh hash.sh lang.sh simple.sh dependencies.sh locking.sh parallel.sh \
|
TESTS = init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \
|
||||||
build-hook.sh substitutes.sh substitutes2.sh fallback.sh nix-push.sh gc.sh \
|
locking.sh parallel.sh build-hook.sh substitutes.sh substitutes2.sh \
|
||||||
gc-concurrent.sh verify.sh nix-pull.sh referrers.sh user-envs.sh \
|
fallback.sh nix-push.sh gc.sh gc-concurrent.sh verify.sh nix-pull.sh \
|
||||||
logging.sh nix-build.sh misc.sh
|
referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh
|
||||||
|
|
||||||
XFAIL_TESTS =
|
XFAIL_TESTS =
|
||||||
|
|
||||||
|
|
13
tests/add.sh
Normal file
13
tests/add.sh
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
source common.sh
|
||||||
|
|
||||||
|
file=./add.sh
|
||||||
|
|
||||||
|
path=$($nixstore --add $file)
|
||||||
|
|
||||||
|
echo $path
|
||||||
|
|
||||||
|
hash=$($nixstore -q --hash $path)
|
||||||
|
|
||||||
|
echo $hash
|
||||||
|
|
||||||
|
test "$hash" = "sha256:$(nix-hash --type sha256 --base32 $file)"
|
Loading…
Reference in a new issue