Skip to content

Commit

Permalink
Protect test-sym agains wild exception
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Feb 5, 2025
1 parent 12995f4 commit c5bf54f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions bin/commands/cmd_test_symbolic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,18 @@ let run_and_check_result i prelude results ({ Test.path; metadata; _ } as test)
| Error _err -> test.result <- Some Anomaly
| Ok prog ->
let start = Sys.time () in
let _ =
Symbolic_interpreter.run ~no_stop_at_failure:false
~out_cb:(check_result test)
~err_cb:(fun _ _err -> [])
path prog
let () =
try
let _ =
Symbolic_interpreter.run ~no_stop_at_failure:false
~out_cb:(check_result test)
~err_cb:(fun _ _err -> [])
path prog
in
()
with exn ->
Fmt.epr "uncaught exception: %s@." (Printexc.to_string exn);
test.result <- Some Anomaly
in
test.time <- Sys.time () -. start;
Fmt.pr "%05d %a@." !i Test.pp test;
Expand Down

0 comments on commit c5bf54f

Please sign in to comment.