feat(runtest): allow running (tests) and (inline_tests)#11980
Closed
Alizter wants to merge 4 commits intoocaml:mainfrom
Closed
feat(runtest): allow running (tests) and (inline_tests)#11980Alizter wants to merge 4 commits intoocaml:mainfrom
Alizter wants to merge 4 commits intoocaml:mainfrom
Conversation
428ebbb to
98da0e5
Compare
We modify dune runtest to allow for inline tests to be run. Users may now run ``` dune runtest src/my_lib_with_tests ``` to run tests associated with a library that has `(inline_tests)`. Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
rgrinberg
reviewed
Aug 1, 2025
| Dune_file.find_stanzas dune_file Dune_rules.Library.key | ||
| >>| List.filter_map ~f:(fun { Library.sub_systems; name = _loc, name; _ } -> | ||
| Option.some_if | ||
| (Dune_rules.Sub_system_name.Map.mem |
Member
There was a problem hiding this comment.
Using the sub system is a bit too level for functionality like this. I think you should expose what you need from the Dune_rules.Inline_tests module.
6 tasks
Collaborator
Author
|
Subsumed by #12689 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR we add support for running individual libraries with
(inline_tests)and individual(tests)executables.If you have a library or test stanza in
src/:you can do:
to run them.
Fix #870