aboutsummaryrefslogtreecommitdiff
path: root/tests/test/simple/generated/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/simple/generated/testscript
parentac76a4fd2afff48a0d5db84592babe5cabef3a2c (diff)
Add support for test timeouts
Diffstat (limited to 'tests/test/simple/generated/testscript')
-rw-r--r--tests/test/simple/generated/testscript57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/test/simple/generated/testscript b/tests/test/simple/generated/testscript
index a04dccc..f6a89d8 100644
--- a/tests/test/simple/generated/testscript
+++ b/tests/test/simple/generated/testscript
@@ -42,3 +42,60 @@ driver = $src_root/../exe{driver}
./: file{output}: test.stdout = true
file{output}: in{output} $src_root/manifest #@@ in module
EOI
+
+: timeout
+:
+{
+ : operation
+ :
+ {
+ : no-output
+ :
+ ln -s $src_base/output.in ./;
+ $* config.test.timeout=1 <<EOI 2>>/~%EOE% != 0
+ driver = $src_root/../exe{driver}
+ ./: test = $driver
+ ./: test.options = -s
+ ./: $driver
+ EOI
+ error: test dir{./} failed
+ % error: .+ -s terminated: execution timeout expired%
+ % info: test command line: .+%
+ EOE
+
+ : output
+ :
+ ln -s $src_base/output.in ./;
+ $* config.test.timeout=1 &output &output.d <<EOI 2>>/~%EOE% != 0
+ driver = $src_root/../exe{driver}
+ ./: test = $driver
+ ./: test.options = -s
+ ./: $driver
+ ./: file{output}: test.stdout = true
+ file{output}: in{output} $src_root/manifest #@@ in module
+ EOI
+ error: test dir{./} failed
+ % error: diff .+ terminated: execution timeout expired%
+ % error: .+ -s terminated: execution timeout expired%
+ % info: test command line: .+%
+ EOE
+ }
+
+ : test
+ :
+ {
+ : no-output
+ :
+ ln -s $src_base/output.in ./;
+ $* config.test.timeout=/1 <<EOI 2>>/~%EOE% != 0
+ driver = $src_root/../exe{driver}
+ ./: test = $driver
+ ./: test.options = -s
+ ./: $driver
+ EOI
+ error: test dir{./} failed
+ % error: .+ -s terminated: execution timeout expired%
+ % info: test command line: .+%
+ EOE
+ }
+}