Commit 065be4f5 authored by Andre Maroneze's avatar Andre Maroneze 💬
Browse files

Merge branch 'fix/ptests/timeout-cpu' into 'master'

use CPU user time for measuring timeout instead of wall clock

Closes #923

See merge request frama-c/frama-c!2766
parents b1c454a6 439bf461
......@@ -991,7 +991,8 @@ test
& \textit{None}
\\
& \texttt{TIMEOUT}\nscodeidxdef{Test!Directive}{TIMEOUT}
& kill the test after the given duration and report a failure
& kill the test after the given duration (in seconds of CPU user time)
and report a failure
& \textit{None}
\\
& \texttt{NOFRAMAC}\nscodeidxdef{Test!Directive}{NOFRAMAC}
......
......@@ -1037,7 +1037,7 @@ let basic_command_string =
end
in
if command.timeout = "" then raw_command
else "timeout " ^ command.timeout ^ " " ^ raw_command
else "ulimit -t " ^ command.timeout ^ " && " ^ raw_command
(* Searches for executable [s] in the directories contained in the PATH
environment variable. Returns [None] if not found, or
......@@ -1128,7 +1128,7 @@ let command_string command =
| "" -> command_string
| s ->
Printf.sprintf
"%s; if test $? -eq 124; then \
"%s; if test $? -gt 127; then \
echo 'TIMEOUT (%s); ABORTING EXECUTION' > %s; \
fi"
command_string s (Filename.sanitize stderr)
......
/* run.config*
TIMEOUT: 45s
TIMEOUT: 600
OPT: -eva
*/
......
/* run.config*
TIMEOUT: 45s
TIMEOUT: 600
OPT: -eva
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment