Une nouvelle version du portail de gestion des comptes externes sera mise en production lundi 09 août. Elle permettra d'allonger la validité d'un compte externe jusqu'à 3 ans. Pour plus de détails sur cette version consulter : https://doc-si.inria.fr/x/FCeS

Commit 83c8aee2 authored by MARCHE Claude's avatar MARCHE Claude
Browse files

fix issues for running examples/regtests with new replayer

parent 1456ecb9
...@@ -45,18 +45,22 @@ module Unix_scheduler = struct ...@@ -45,18 +45,22 @@ module Unix_scheduler = struct
let prompt_delay = ref 0 let prompt_delay = ref 0
let print_prompt = ref true let print_prompt = ref true
let prompt = ref "> " let prompt_string = ref "> "
(* [main_loop interp] starts the scheduler. On idle, standard input is (* [main_loop interp] starts the scheduler. On idle, standard input is
read. When a complete line is read from stdin, it is passed read. When a complete line is read from stdin, it is passed
as a string to the function [interp] *) as a string to the function [interp] *)
let main_loop interp = let main_loop ?prompt interp =
begin match prompt with
| None -> ()
| Some s -> prompt_string := s
end;
try try
while true do while true do
if !print_prompt then begin if !print_prompt then begin
prompt_delay := !prompt_delay + 1; prompt_delay := !prompt_delay + 1;
if !prompt_delay = 1 then begin if !prompt_string <> "" && !prompt_delay = 1 then begin
Format.printf "%s@?" !prompt; Format.printf "%s@?" !prompt_string;
prompt_delay := 0; prompt_delay := 0;
print_prompt := false; print_prompt := false;
end end
...@@ -87,7 +91,8 @@ module Unix_scheduler = struct ...@@ -87,7 +91,8 @@ module Unix_scheduler = struct
| (_,t,_) :: _ -> t -. time | (_,t,_) :: _ -> t -. time
(* or the time left until the next timeout otherwise *) (* or the time left until the next timeout otherwise *)
in in
let a,_,_ = Unix.select [Unix.stdin] [] [] delay in let a,_,_ = Unix.select
(if !prompt_string <> "" then [Unix.stdin] else []) [] [] delay in
match a with match a with
| [_] -> | [_] ->
let n = Unix.read Unix.stdin buf 0 256 in let n = Unix.read Unix.stdin buf 0 256 in
......
...@@ -15,6 +15,6 @@ module Unix_scheduler : sig ...@@ -15,6 +15,6 @@ module Unix_scheduler : sig
registered at the same time. Functions registered with higher registered at the same time. Functions registered with higher
priority will be called first. *) priority will be called first. *)
val main_loop: (string -> 'a) -> unit val main_loop: ?prompt:string -> (string -> 'a) -> unit
end end
...@@ -391,7 +391,7 @@ let () = ...@@ -391,7 +391,7 @@ let () =
if found_obs then eprintf "[Warning] session is obsolete@."; if found_obs then eprintf "[Warning] session is obsolete@.";
if some_merge_miss then eprintf "[Warning] some goals were missed during merge@."; if some_merge_miss then eprintf "[Warning] some goals were missed during merge@.";
add_to_check_no_smoke some_merge_miss found_obs cont; add_to_check_no_smoke some_merge_miss found_obs cont;
Unix_scheduler.Unix_scheduler.main_loop (fun _ -> ()); Unix_scheduler.Unix_scheduler.main_loop ~prompt:"" (fun _ -> ());
eprintf "main replayer loop exited unexpectedly@."; eprintf "main replayer loop exited unexpectedly@.";
exit 1 exit 1
with with
......
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