Skip to content

Commit

Permalink
Fixes for reftests on OSX
Browse files Browse the repository at this point in the history
TMPDIR var is required for proper sandboxing etc.
randomly it's prefixed with /private
and workaround dune running a pager through GIT_PAGER (see ocaml/dune#3912)
  • Loading branch information
AltGr committed Mar 11, 2021
1 parent 1e66a5e commit e4d39bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/reftests/run.ml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ let base_env =
"OPAMNOENVNOTICE", "1";
"OPAMNODEPEXTS", "1";
"OPAMDOWNLOADJOBS", "1";
"TMPDIR", Filename.get_temp_dir_name ();
]

(* See [opamprocess.safe_wait] *)
Expand Down Expand Up @@ -113,7 +114,7 @@ let run_cmd ~opam ~dir ?(vars=[]) cmd =
Printf.sprintf
"%s %s %s 2>&1 \
| sed 's#%s#${BASEDIR}#g' \
| sed 's#%s/opam-[0-9a-f]*-[0-9a-f]*/#${OPAMTMP}/#g'"
| sed 's#\\(/private\\)*%s/*opam-[0-9a-f]*-[0-9a-f]*/#${OPAMTMP}/#g'"
opam cmd (String.concat " " args)
dir
(Filename.get_temp_dir_name ())
Expand Down

0 comments on commit e4d39bc

Please sign in to comment.