forked from lix-project/lix
Implement regression test for empty logs loaded via nix log
This commit is contained in:
parent
c85467a1b6
commit
d02e34ef06
|
@ -13,3 +13,14 @@ rm -rf $NIX_LOG_DIR
|
||||||
(! nix-store -l $path)
|
(! nix-store -l $path)
|
||||||
nix-build dependencies.nix --no-out-link --compress-build-log
|
nix-build dependencies.nix --no-out-link --compress-build-log
|
||||||
[ "$(nix-store -l $path)" = FOO ]
|
[ "$(nix-store -l $path)" = FOO ]
|
||||||
|
|
||||||
|
# test whether empty logs work fine with `nix log`.
|
||||||
|
builder="$(mktemp)"
|
||||||
|
echo -e "#!/bin/sh\nmkdir \$out" > "$builder"
|
||||||
|
outp="$(nix-build -E \
|
||||||
|
'with import ./config.nix; mkDerivation { name = "fnord"; builder = '"$builder"'; }' \
|
||||||
|
--out-link "$(mktemp -d)/result")"
|
||||||
|
|
||||||
|
test -d "$outp"
|
||||||
|
|
||||||
|
nix log "$outp"
|
||||||
|
|
Loading…
Reference in a new issue