Skip to content

Commit

Permalink
Merge pull request ocaml#6135 from rjbou/pin-test
Browse files Browse the repository at this point in the history
Reftest: add pin command test
  • Loading branch information
kit-ty-kate authored Oct 7, 2024
2 parents a01d85a + ab8c465 commit c048c05
Show file tree
Hide file tree
Showing 4 changed files with 1,297 additions and 347 deletions.
2 changes: 2 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ users)

## Reftests
### Tests
* Move pin test to pin-legacy [#6135 @rjbou]
* More exhaustive test for pin command: test different behaviour and cli options [#6135 @rjbou]

### Engine

Expand Down
21 changes: 21 additions & 0 deletions tests/reftests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,27 @@
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:pat-sub.test} %{read-lines:testing-env}))))

(rule
(alias reftest-pin-legacy)
(enabled_if (and (or (<> %{env:TESTALL=1} 0) (= %{env:TESTN0REP0=0} 1))))
(action
(diff pin-legacy.test pin-legacy.out)))

(alias
(name reftest)
(enabled_if (and (or (<> %{env:TESTALL=1} 0) (= %{env:TESTN0REP0=0} 1))))
(deps (alias reftest-pin-legacy)))

(rule
(targets pin-legacy.out)
(deps root-N0REP0)
(enabled_if (and (or (<> %{env:TESTALL=1} 0) (= %{env:TESTN0REP0=0} 1))))
(package opam)
(action
(with-stdout-to
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:pin-legacy.test} %{read-lines:testing-env}))))

(rule
(alias reftest-pin)
(enabled_if (and (or (<> %{env:TESTALL=1} 0) (= %{env:TESTN0REP0=0} 1))))
Expand Down
Loading

0 comments on commit c048c05

Please sign in to comment.