aboutsummaryrefslogtreecommitdiff
path: root/tests/fixed.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-09-29 10:13:45 +0200
committerGitHub <noreply@github.com>2021-09-29 10:13:45 +0200
commit6b5efeafd1f029143351e5bcb0bd9f9f2add8dd1 (patch)
tree60d7500ad504278bd3d81cc31f8234fe617c3c81 /tests/fixed.nix
parent9c766a40cbbd3a350a9582d0fd8201e3361a63b2 (diff)
parentbb1a851bcf1bf62b5d943ba25d57b680711a64c6 (diff)
Merge pull request #5295 from Ma27/bmcheck-fod-mismatch
build: also throw hash-mismatch errors if `buildMode == bmCheck`
Diffstat (limited to 'tests/fixed.nix')
-rw-r--r--tests/fixed.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fixed.nix b/tests/fixed.nix
index 76580ffa1..babe71504 100644
--- a/tests/fixed.nix
+++ b/tests/fixed.nix
@@ -21,6 +21,14 @@ rec {
(f ./fixed.builder2.sh "recursive" "sha1" "vw46m23bizj4n8afrc0fj19wrp7mj3c0")
];
+ # Expression to test that `nix-build --check` also throws an error if the hash of
+ # fixed-output derivation has changed even if the hash exists in the store (in this
+ # case the hash exists because of `fixed.builder2.sh`, but building a derivation
+ # with the same hash and a different result must throw an error).
+ check = [
+ (f ./fixed.builder1.sh "recursive" "md5" "3670af73070fa14077ad74e0f5ea4e42")
+ ];
+
good2 = [
# Yes, this looks fscked up: builder2 doesn't have that result.
# But Nix sees that an output with the desired hash already