Skip to content

Commit

Permalink
Merge pull request #5270 from kit-ty-kate/reftest-unhelpful
Browse files Browse the repository at this point in the history
Add some tests showing the unhelpful conflict messages mentionned in #4373
  • Loading branch information
kit-ty-kate authored Sep 2, 2022
2 parents 2a29c40 + 5cf7c4b commit 31ce455
Show file tree
Hide file tree
Showing 3 changed files with 307 additions and 0 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ users)
* Add a series of reftests showing empty conflict messages [#5253 @kit-ty-kate]
* Fix the reftests under some heavy parallel hardwear [#5262 @kit-ty-kate]
* Add some tests for --best-effort to avoid further regressions when trying to install specific versions of packages [@5261 @kit-ty-kate]
* Add unhelpful conflict error message test [#5270 @kit-ty-kate]
### Engine
* Add `opam-cat` to normalise opam file printing [#4763 @rjbou @dra27] [2.1.0~rc2 #4715]
* Fix meld reftest: open only with failing ones [#4913 @rjbou]
Expand Down
37 changes: 37 additions & 0 deletions tests/reftests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,23 @@
%{targets}
(run ./run.exe %{bin:opam} %{dep:switch-set.test} %{read-lines:testing-env}))))

(rule
(alias reftest-unhelpful-conflicts-001)
(action
(diff unhelpful-conflicts-001.test unhelpful-conflicts-001.out)))

(alias
(name reftest)
(deps (alias reftest-unhelpful-conflicts-001)))

(rule
(targets unhelpful-conflicts-001.out)
(deps root-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a)
(action
(with-stdout-to
%{targets}
(run ./run.exe %{bin:opam} %{dep:unhelpful-conflicts-001.test} %{read-lines:testing-env}))))

(rule
(alias reftest-update-upgrade)
(action
Expand Down Expand Up @@ -1279,6 +1296,26 @@
--no-setup --bypass-checks --no-opamrc --bare
file://%{dep:opam-repo-c1842d168d})))))

(rule
(targets opam-archive-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a.tar.gz)
(action (run curl --silent -Lo %{targets} https://github.com/ocaml/opam-repository/archive/c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a.tar.gz)))

(rule
(targets opam-repo-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a)
(action
(progn
(run mkdir -p %{targets})
(run tar -C %{targets} -xzf %{dep:opam-archive-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a.tar.gz} --strip-components=1))))

(rule
(targets root-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a)
(action
(progn
(ignore-stdout
(run %{bin:opam} init --root=%{targets}
--no-setup --bypass-checks --no-opamrc --bare
file://%{dep:opam-repo-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a})))))

(rule
(targets opam-archive-c1d23f0e.tar.gz)
(action (run curl --silent -Lo %{targets} https://github.com/ocaml/opam-repository/archive/c1d23f0e.tar.gz)))
Expand Down
Loading

0 comments on commit 31ce455

Please sign in to comment.