From e21f5d8e21c4394c966e74269435db11cae11b83 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Tue, 3 Nov 2020 19:03:02 +0100 Subject: [PATCH] Fixes for reftests on OSX TMPDIR var is required for proper sandboxing etc. randomly it's prefixed with /private and workaround dune running a pager through GIT_PAGER (see https://github.com/ocaml/dune/pull/3912) --- .travis-ci.sh | 2 ++ tests/reftests/run.ml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index 807e39ff4ad..5b315986540 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -10,6 +10,8 @@ COLD=${COLD:-0} OPAM_TEST=${OPAM_TEST:-0} EXTERNAL_SOLVER=${EXTERNAL_SOLVER:-} +export GIT_PAGER= + set +x echo "TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE" echo "TRAVIS_COMMIT=$TRAVIS_COMMIT" diff --git a/tests/reftests/run.ml b/tests/reftests/run.ml index 5286eee4cd7..0f37e9f519b 100644 --- a/tests/reftests/run.ml +++ b/tests/reftests/run.ml @@ -65,6 +65,7 @@ let base_env = "OPAMNOENVNOTICE", "1"; "OPAMNODEPEXTS", "1"; "OPAMDOWNLOADJOBS", "1"; + "TMPDIR", Filename.get_temp_dir_name (); ] (* See [opamprocess.safe_wait] *) @@ -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 ())