Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: remove redundant dune rules #36

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

vbgl
Copy link
Contributor

@vbgl vbgl commented Dec 9, 2024

These rules are broken with dune 3.17.0

Fixes #35.

These rules are broken with dune 3.17.0
@bclement-ocp
Copy link
Contributor

Thanks for the report and suggested fix! I don't really understand what changed in dune 3.17 to break this, and I will look into it, but you might know — you are saying these rules are redundant ; are they automatically introduced by the test rules now?

@vbgl
Copy link
Contributor Author

vbgl commented Dec 10, 2024

Sorry, I don’t have any answer to your questions.

@Halbaroth
Copy link
Collaborator

Thanks for reporting the issue. It seems that Dune automatically generates these rules according to the documentation of tests:
https://dune.readthedocs.io/en/stable/reference/dune/test.html

This defines an executable named mytest.exe that will be executed as part of the runtest alias. If the directory also contains
an expect_test.expected file, then expect_test will be used to define an expect test. That is, the test will be executed and its
output will be compared to expect_test.expected.

This stanza has been added several years ago: ocaml/dune#822. There is no relation with the latest release but it seems that we did not use correctly this stanza. I guess Dune does not realize that the rule below needs to run after tests.

(rule
 (alias runtest)
 (action
  (diff solveEmpty.expected solveEmpty.output)
 )
)

I checked that tests are still running with your patch with Dune 3.16 and 3.17.

@Halbaroth Halbaroth merged commit 0d52396 into OCamlPro:master Dec 11, 2024
@vbgl vbgl deleted the tests-dune-clean branch December 11, 2024 13:07
@vbgl
Copy link
Contributor Author

vbgl commented Dec 11, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests fail with dune 3.17.0
3 participants