diff options
author | eldritch horrors <pennae@lix.systems> | 2024-08-25 13:41:56 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-08-25 22:21:32 +0000 |
commit | b6884388a1281d70bb4e5bb12e1cadd34bb832f0 (patch) | |
tree | faffce05fdcf7483132e44f17f2f0aca1fe62b88 /tests/functional/build.sh | |
parent | 0582999bd12062f80cddc2c3d321b2febfa081bd (diff) |
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
Diffstat (limited to 'tests/functional/build.sh')
-rw-r--r-- | tests/functional/build.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/functional/build.sh b/tests/functional/build.sh index a540cf8fd..356985a64 100644 --- a/tests/functional/build.sh +++ b/tests/functional/build.sh @@ -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 |