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

feature: add aliases for inline tests #11109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Alizter
Copy link
Collaborator

@Alizter Alizter commented Nov 10, 2024

For a given library with inlines tests, we add an alias with the name of the library for running those tests.

Further work on separating out the partition actions would allow us to have an alias for each partition.

For now, this will allow us to run inline tests with the runtest command. Further work on that will follow this PR.

This addresses part of #10239 the remaining part would be to add an alias to the (test) stanza.

  • changelog
  • documentation

@Alizter Alizter requested a review from rgrinberg November 10, 2024 16:20
@Alizter Alizter force-pushed the ps/rr/feature__add_aliases_for_inline_tests branch from b5d5d4f to 0e1c216 Compare November 10, 2024 16:24
@Alizter Alizter marked this pull request as draft November 20, 2024 21:59
@Alizter Alizter force-pushed the ps/rr/feature__add_aliases_for_inline_tests branch from 0e1c216 to 9842240 Compare March 19, 2025 14:39
Alizter added a commit to Alizter/dune that referenced this pull request Mar 19, 2025
This bug was noticed when working on ocaml#11109. The issue is that the cram
rules create two copies of the anonymous cram action, however since the
alias names are different (runtest vs cram test name) this ends up with
having two different digests. This means that when building `@runtest` and
`@mycram` we end up running the cram test `mycram.t` twice.

This test demonstrates this behaviour.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter Alizter force-pushed the ps/rr/feature__add_aliases_for_inline_tests branch 2 times, most recently from 0a26c59 to 8a845fe Compare March 22, 2025 15:11
@Alizter Alizter marked this pull request as ready for review March 22, 2025 15:11
@Alizter Alizter requested a review from hhugo March 22, 2025 15:12
@Alizter Alizter force-pushed the ps/rr/feature__add_aliases_for_inline_tests branch from 8a845fe to 6401184 Compare March 22, 2025 15:22
@Alizter
Copy link
Collaborator Author

Alizter commented Mar 22, 2025

@emillon I've updated the documentation but it could be better. Any ideas on improving it?

@Alizter Alizter force-pushed the ps/rr/feature__add_aliases_for_inline_tests branch from 6401184 to ef3524f Compare March 22, 2025 15:35
Alizter added a commit to Alizter/dune that referenced this pull request Mar 23, 2025
This bug was noticed when working on ocaml#11109. The issue is that the cram
rules create two copies of the anonymous cram action, however since the
alias names are different (runtest vs cram test name) this ends up with
having two different digests. This means that when building `@runtest` and
`@mycram` we end up running the cram test `mycram.t` twice.

This test demonstrates this behaviour.

Signed-off-by: Ali Caglayan <[email protected]>
For a given library with inlines tests, we add an alias with the name of
the library for running those tests.

Further work on separating out the partition actions would allow us to
have an alias for each partition.

For now, this allows us to run inline tests with the runtest command.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter Alizter force-pushed the ps/rr/feature__add_aliases_for_inline_tests branch from ef3524f to ff7d3da Compare March 23, 2025 12:17
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.

3 participants