about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/timeout.nix8
-rw-r--r--tests/timeout.sh5
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/timeout.nix b/tests/timeout.nix
index 1f3f23f16a..540fba934f 100644
--- a/tests/timeout.nix
+++ b/tests/timeout.nix
@@ -17,4 +17,12 @@ with import ./config.nix;
     '';
   };
 
+  closeLog = mkDerivation {
+    name = "silent";
+    buildCommand = ''
+      exec > /dev/null 2>&1
+      sleep 1000000000
+    '';
+  };
+
 }
diff --git a/tests/timeout.sh b/tests/timeout.sh
index ba9a6c3df2..ce1ae7d674 100644
--- a/tests/timeout.sh
+++ b/tests/timeout.sh
@@ -24,3 +24,8 @@ if nix-build timeout.nix -A silent --max-silent-time 2; then
     echo "build should have failed"
     exit 1
 fi
+
+if nix-build timeout.nix -A closeLog; then
+    echo "build should have failed"
+    exit 1
+fi