about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-24T10·10+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-24T10·10+0200
commit01ddf53ee9ff77cbd7fc659740279a6ba80fbdae (patch)
treeeae0348f1d5f59ea181a358c7d28ac4ee1578500 /tests
parentd7a92ed4a9faf8237322166656a2639d787cdeec (diff)
tests/remote-builds.nix: Test failing build
Diffstat (limited to 'tests')
-rw-r--r--tests/remote-builds.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/remote-builds.nix b/tests/remote-builds.nix
index 6fc372c70f3b..81b81b87c115 100644
--- a/tests/remote-builds.nix
+++ b/tests/remote-builds.nix
@@ -25,7 +25,7 @@ let
         system = "i686-linux";
         PATH = "''${utils}/bin";
         builder = "''${utils}/bin/sh";
-        args = [ "-c" "echo Hello; mkdir $out $foo; cat /proc/sys/kernel/hostname > $out/host; ln -s $out $foo/bar; sleep 5" ];
+        args = [ "-c" "if [ ${toString nr} = 5 ]; then echo FAIL; exit 1; fi; echo Hello; mkdir $out $foo; cat /proc/sys/kernel/hostname > $out/host; ln -s $out $foo/bar; sleep 5" ];
         outputs = [ "out" "foo" ];
       }
     '';
@@ -92,6 +92,9 @@ in
       $slave1->succeed("test -e $out1 -o -e $out2");
       $slave2->succeed("test -e $out1 -o -e $out2");
 
+      # And a failing build.
+      $client->fail("nix-build ${expr nodes.client.config 5}");
+
       # Test whether the build hook automatically skips unavailable slaves.
       $slave1->block;
       $client->succeed("nix-build ${expr nodes.client.config 4}");