aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/builtin/sleep.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-10-10 17:22:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-11-06 19:32:09 +0300
commitf41599c8e9435f3dfec60b872c2b4ae31177efdd (patch)
tree088f8d9bf906e4a2ed734e034699163c9ccc7306 /tests/test/script/builtin/sleep.testscript
parentac76a4fd2afff48a0d5db84592babe5cabef3a2c (diff)
Add support for test timeouts
Diffstat (limited to 'tests/test/script/builtin/sleep.testscript')
-rw-r--r--tests/test/script/builtin/sleep.testscript18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test/script/builtin/sleep.testscript b/tests/test/script/builtin/sleep.testscript
index 21ed07b..e1410ac 100644
--- a/tests/test/script/builtin/sleep.testscript
+++ b/tests/test/script/builtin/sleep.testscript
@@ -6,3 +6,21 @@
: success
:
$c <'sleep 1' && $b
+
+: timeout
+:
+{
+ : failure
+ :
+ $c <'env -t 1 -- sleep 86400' && $b 2>>~%EOE% != 0
+ %testscript:.*: error: sleep terminated: execution timeout expired%
+ %.
+ EOE
+
+ : success
+ :
+ $c <<EOI && $b
+ timeout --success 1;
+ sleep 86400
+ EOI
+}