diff --git a/tests/reftests/env-dra27.win32.test b/tests/reftests/env-dra27.win32.test index 2855c188d5d..4c01566de40 100644 --- a/tests/reftests/env-dra27.win32.test +++ b/tests/reftests/env-dra27.win32.test @@ -70,5 +70,5 @@ CI = /home/ci/config norewrite Updated\ by\ package\ setenv-dra27 FOO = this\ does\ not\ require/allow\ a\ rewrite\ entry ; target Updated\ by\ package\ setenv-dra27 MANPATH =: ${BASEDIR}/OPAM/rewriting/man Current\ opam\ switch\ man\ dir PATH =+= ${BASEDIR}/OPAM/rewriting/bin Binary\ dir\ for\ opam\ switch\ rewriting -### opam env | grep PKG_CONFIG | '/tmp/build_[^/]*/opam-reftest-[^/]*/' -> '${BASEDIR}/' +### opam env | grep PKG_CONFIG PKG_CONFIG_PATH='/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.38.33030/bin/HostX64/x64;C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/VC/VCPackages;C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/Tools/:/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Preview/Common7/Tools/:/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/VC/VCPackages:/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.38.33030/bin/HostX64/x64:${BASEDIR}/OPAM/rewriting/lib/pkgconfig'; export PKG_CONFIG_PATH; diff --git a/tests/reftests/run.ml b/tests/reftests/run.ml index 89f70ded413..06ddcb87ca8 100644 --- a/tests/reftests/run.ml +++ b/tests/reftests/run.ml @@ -541,6 +541,11 @@ let parse_command = Parse.command let common_filters ?opam dir = let tmpdir = OpamSystem.real_path (Filename.get_temp_dir_name ()) in let open Re in + let dir_to_regex dir = + if Sys.win32 then + [str dir; str (OpamSystem.back_to_forward dir); str (OpamSystem.apply_cygpath dir)] + else + [str dir] in [ seq [ bol; alt [ str "#=== ERROR"; @@ -554,11 +559,10 @@ let common_filters ?opam dir = GrepV; seq [bol; str cmd_prompt], Sed "##% "; - alt [str dir; str (OpamSystem.back_to_forward dir)], + alt (dir_to_regex dir), Sed "${BASEDIR}"; seq [ - alt [str tmpdir; - str (OpamSystem.back_to_forward tmpdir)]; + alt (dir_to_regex tmpdir); rep (set "/\\"); str "opam-"; rep1 (alt [xdigit; char '-'])],