Skip to content

Commit

Permalink
reftest: add 'env.unix' & 'env.win32' to test environment variables r…
Browse files Browse the repository at this point in the history
…ewriting rules
  • Loading branch information
rjbou committed Nov 13, 2023
1 parent 8e65837 commit a9015ff
Show file tree
Hide file tree
Showing 4 changed files with 1,534 additions and 9 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ users)
* dot-install: add a test for removal of non specified in .install empty directories [#5701 @rjbou]
* Add test in assume-built for depends with switch variable filters [#5700 @rjbou]
* Add undefined variable handling in assume built test [#5701 @rjbou]
* Add `env.unix` & `env.win32` to test environment variables rewriting rules [#5636 @rjbou]

### Engine
* With real path resolved for all opam temp dir, remove `/private` from mac temp dir regexp [#5654 @rjbou]
Expand Down
21 changes: 21 additions & 0 deletions tests/reftests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,27 @@
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:env.test} %{read-lines:testing-env}))))

(rule
(alias reftest-env.unix)
(enabled_if (= %{os_type} "Unix"))
(action
(diff env.unix.test env.unix.out)))

(alias
(name reftest)
(enabled_if (= %{os_type} "Unix"))
(deps (alias reftest-env.unix)))

(rule
(targets env.unix.out)
(deps root-N0REP0)
(enabled_if (= %{os_type} "Unix"))
(package opam)
(action
(with-stdout-to
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:env.unix.test} %{read-lines:testing-env}))))

(rule
(alias reftest-env.win32)
(enabled_if (= %{os_type} "Win32"))
Expand Down
Loading

0 comments on commit a9015ff

Please sign in to comment.