The current test implementation tries to update PATH in two locations. One is PrepareBin.prepare_bin and the other is `TestLib.with_bin_dir. They need to be unified.
(* PrepareBin *)
let prepare_bin bin log_file =
let path = Unix.getenv "PATH" in
let gen_bin name content =
let path = FilePath.concat bin name in
let open Shexp_process in
let open Infix in
mkdir ~p:() bin
>> stdout_to path (content |> echo)
>> chmod path ~perm:0o755
in
let open Shexp_process in
let open Infix in
Unix.putenv "PATH" (bin ^ ":" ^ path);
gen_bin "satysfi" (satysfi log_file)
>> gen_bin "opam" (opam log_file)
The current test implementation tries to update PATH in two locations. One is
PrepareBin.prepare_bin
and the other is `TestLib.with_bin_dir. They need to be unified.