aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/ca/racy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/ca/racy.nix')
-rw-r--r--tests/functional/ca/racy.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional/ca/racy.nix b/tests/functional/ca/racy.nix
new file mode 100644
index 000000000..555a15484
--- /dev/null
+++ b/tests/functional/ca/racy.nix
@@ -0,0 +1,15 @@
+# A derivation that would certainly fail if several builders tried to
+# build it at once.
+
+
+with import ./config.nix;
+
+mkDerivation {
+ name = "simple";
+ buildCommand = ''
+ mkdir $out
+ echo bar >> $out/foo
+ sleep 3
+ [[ "$(cat $out/foo)" == bar ]]
+ '';
+}