mirror of
https://github.com/NixOS/nix
synced 2025-07-09 16:13:54 +02:00
* Negative caching, i.e. caching of build failures. Disabled by
default. This is mostly useful for Hydra.
This commit is contained in:
parent
7024a1ef07
commit
92f525ecf4
7 changed files with 140 additions and 7 deletions
21
tests/negative-caching.nix
Normal file
21
tests/negative-caching.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
with import ./config.nix;
|
||||
|
||||
rec {
|
||||
|
||||
fail = mkDerivation {
|
||||
name = "fail";
|
||||
builder = builtins.toFile "builder.sh" "echo FAIL; exit 1";
|
||||
};
|
||||
|
||||
succeed = mkDerivation {
|
||||
name = "succeed";
|
||||
builder = builtins.toFile "builder.sh" "echo SUCCEED; mkdir $out";
|
||||
};
|
||||
|
||||
depOnFail = mkDerivation {
|
||||
name = "dep-on-fail";
|
||||
builder = builtins.toFile "builder.sh" "echo URGH; mkdir $out";
|
||||
inputs = [fail succeed];
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue