aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-10-05 14:29:52 +0200
committereldritch horrors <pennae@lix.systems>2024-10-05 16:21:19 +0000
commita3dd07535c183433a3f1f97596e9d2b41f8a33ba (patch)
tree7f48049ade7e013823f11e6e68a01d971a5b2d27
parent5df2cccc4956e53b56ba1613e36d64dc8057c508 (diff)
fix build test error count checks
with async runtime scheduling we can no longer guarantee exact error counts for builds that do not set keepGoing. the old behavior can be recovered with a number of hacks that affect scheduling, but none of those are very easy to follow now advisable. exact error counts will like not be needed for almost all uses except tests, and *those* had better check the actual messages rather than how many they got. more messages can even help to avoid unnecessary rebuilds for most users. Change-Id: I1c9aa7a401227dcaf2e19975b8cb83c5d4f85d64
-rw-r--r--tests/functional/build.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/build.sh b/tests/functional/build.sh
index a14f6e3c2..58fba83aa 100644
--- a/tests/functional/build.sh
+++ b/tests/functional/build.sh
@@ -144,8 +144,8 @@ test "$(<<<"$out" grep -E '^error:' | wc -l)" = 1
# --keep-going and FOD
out="$(nix build -f fod-failing.nix -L 2>&1)" && status=0 || status=$?
test "$status" = 1
-# one "hash mismatch" error, one "build of ... failed"
-test "$(<<<"$out" grep -E '^error:' | wc -l)" = 2
+# at least one "hash mismatch" error, one "build of ... failed"
+test "$(<<<"$out" grep -E '^error:' | wc -l)" -ge 2
<<<"$out" grepQuiet -E "hash mismatch in fixed-output derivation '.*-x.\\.drv'"
<<<"$out" grepQuiet -E "likely URL: "
<<<"$out" grepQuiet -E "error: build of '.*-x[1-4]\\.drv\\^out', '.*-x[1-4]\\.drv\\^out', '.*-x[1-4]\\.drv\\^out', '.*-x[1-4]\\.drv\\^out' failed"