forked from lix-project/lix
add dedicated test for hash mismatch url reporting
the current test relies on derivation build order being deterministic,
which will not be a reasonable expectation for all that long any more.
Change-Id: I9be44a7725185f614a9a4c724045b8b1e6962c03
This commit is contained in:
parent
0582999bd1
commit
b6884388a1
|
@ -134,6 +134,13 @@ nix build --impure -f multiple-outputs.nix --json e --no-link | jq --exit-status
|
|||
printf "" | nix build --no-link --stdin --json | jq --exit-status '. == []'
|
||||
printf "%s\n" "$drv^*" | nix build --no-link --stdin --json | jq --exit-status '.[0]|has("drvPath")'
|
||||
|
||||
# URL reporting
|
||||
out="$(nix-build fod-failing.nix -A x1 2>&1)" && status=0 || status=$?
|
||||
test "$status" = 102
|
||||
test "$(<<<"$out" grep -E '^error:' | wc -l)" = 1
|
||||
<<<"$out" grepQuiet -E "hash mismatch in fixed-output derivation '.*-x1\\.drv'"
|
||||
<<<"$out" grepQuiet -E "likely URL: https://meow.puppy.forge/puppy.tar.gz"
|
||||
|
||||
# --keep-going and FOD
|
||||
out="$(nix build -f fod-failing.nix -L 2>&1)" && status=0 || status=$?
|
||||
test "$status" = 1
|
||||
|
|
Loading…
Reference in a new issue