about summary refs log tree commit diff
path: root/tests/negative-caching.nix
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-03-25T21·05+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-03-25T21·05+0000
commit92f525ecf4ea8a9bd356acd1d3845074b1e5b918 (patch)
tree6d022fbd92897ad965a04571b339bad362cb9158 /tests/negative-caching.nix
parent7024a1ef076cedf4596c9f4b107e85d315242cea (diff)
* Negative caching, i.e. caching of build failures. Disabled by
  default.  This is mostly useful for Hydra.

Diffstat (limited to 'tests/negative-caching.nix')
-rw-r--r--tests/negative-caching.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/negative-caching.nix b/tests/negative-caching.nix
new file mode 100644
index 000000000000..10df67a748fc
--- /dev/null
+++ b/tests/negative-caching.nix
@@ -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];
+  };
+
+}