Skip to content
Snippets Groups Projects
Commit 6dd638de authored by Patrick Baudin's avatar Patrick Baudin
Browse files

Merge branch 'bugfix/patrick/ptests-warns-on-invalid-log-bin' into 'master'

[ptests] Adds fatal errors on invalid LOG/BIN directives of EXEC/EXECNOW

See merge request frama-c/frama-c!3947
parents 993ab515 5c192031
No related branches found
No related tags found
No related merge requests found
......@@ -751,11 +751,13 @@ end = struct
try
Scanf.sscanf s.ex_cmd "%_[ ]LOG%_[ ]%[-A-Za-z0-9_',+=:.\\@@]%_[ ]%s@\n"
(fun name cmd ->
if name = "" then fail (file ^": EXEC"^ (if once then "NOW" else "") ^ " directive with an invalid LOG filename: " ^ s.ex_cmd);
aux { s with ex_cmd = cmd; ex_log = name :: s.ex_log })
with Scanf.Scan_failure _ ->
try
Scanf.sscanf s.ex_cmd "%_[ ]BIN%_[ ]%[A-Za-z0-9_.\\-@@]%_[ ]%s@\n"
(fun name cmd ->
if name = "" then fail (file ^": EXEC"^ (if once then "NOW" else "") ^ " directive with an invalid BIN filename: " ^ s.ex_cmd);
aux { s with ex_cmd = cmd; ex_bin = name :: s.ex_bin })
with Scanf.Scan_failure _ ->
try
......@@ -1758,7 +1760,7 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config ~modules ~en
(deps %a %a)\n \
(targets %a %a)\n \
%a\n\
(action (%a (run %s %%{dep:%s} %S)))\n\
(action (run %s %%{dep:%s} %S))\n\
)@."
(* rule: *)
wtest.info
......@@ -1773,7 +1775,6 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config ~modules ~en
(* enabled_if: *)
pp_enabled_if cmd.deps
(* action: *)
pp_accepted_exit_code cmd
!wrapper_cmd
wrapper_basename
wtest.cmd;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment