diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-11-06 20:16:57 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-11-06 20:16:57 +0300 |
commit | a448a249031d207d83535c160eb329d0224ac923 (patch) | |
tree | 70aeecbbf4597d2321b3738ff540c9332d4ec0ac | |
parent | f41599c8e9435f3dfec60b872c2b4ae31177efdd (diff) |
Fix mistreating test operation timeout as test timeout in some case
-rw-r--r-- | libbuild2/test/init.cxx | 2 | ||||
-rw-r--r-- | tests/test/script/runner/timeout.testscript | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/libbuild2/test/init.cxx b/libbuild2/test/init.cxx index 0a47842..47a73ba 100644 --- a/libbuild2/test/init.cxx +++ b/libbuild2/test/init.cxx @@ -220,7 +220,7 @@ namespace build2 m.test_timeout = parse_timeout (string (t, p + 1), tt); } else - m.test_timeout = parse_timeout (t, ot); + m.operation_timeout = parse_timeout (t, ot); } //@@ TODO: Need ability to specify extra diff options (e.g., diff --git a/tests/test/script/runner/timeout.testscript b/tests/test/script/runner/timeout.testscript index ae8f535..bf39034 100644 --- a/tests/test/script/runner/timeout.testscript +++ b/tests/test/script/runner/timeout.testscript @@ -314,7 +314,8 @@ { : set : - $c <<EOI && $b config.test.timeout=1/10 2>>~%EOE% != 0 + $c <<EOI && $b config.test.timeout=1 2>>~%EOE% != 0 + timeout 10; $* -l 3 EOI %testscript:.*: error: .+ terminated: execution timeout expired% @@ -323,7 +324,8 @@ : reset : - $c <<EOI && $b config.test.timeout=1/10 config.test.timeout=0/10 + $c <<EOI && $b config.test.timeout=1 config.test.timeout=0/10 + timeout 10; $* -l 3 EOI @@ -355,7 +357,8 @@ { : set : - $c <<EOI && $b config.test.timeout=10/1 2>>~%EOE% != 0 + $c <<EOI && $b config.test.timeout=/1 2>>~%EOE% != 0 + timeout 10; $* -l 3 EOI %testscript:.*: error: .+ terminated: execution timeout expired% @@ -364,7 +367,8 @@ : reset : - $c <<EOI && $b config.test.timeout=10/1 config.test.timeout=10/0 + $c <<EOI && $b config.test.timeout=/1 config.test.timeout=10/0 + timeout 10; $* -l 3 EOI |