Skip to content

Commit

Permalink
fix: dir_contents from select library dep in test stanza
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <alizter@gmail.com>
  • Loading branch information
Alizter committed Dec 5, 2023
1 parent 9059182 commit 093170f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions doc/changes/9387.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fixed a bug where the `(select)` field of the `(libraries)` field of the
`(test)` stanza wasn't working properly. (#9387, fixes #9365, Alizter)
4 changes: 3 additions & 1 deletion src/dune_rules/dir_contents.ml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ end = struct
>>| Path.Set.to_list_map ~f:Path.basename
| Generate_sites_module_stanza.T def ->
Generate_sites_module_rules.setup_rules sctx ~dir def >>| List.singleton
| Library.T { buildable; _ } | Executables.T { buildable; _ } ->
| Library.T { buildable; _ }
| Executables.T { buildable; _ }
| Tests.T { exes = { buildable; _ }; _ } ->
let select_deps_files = select_deps_files buildable.libraries in
let ctypes_files =
(* Also manually add files generated by ctypes rules. *)
Expand Down
6 changes: 1 addition & 5 deletions test/blackbox-tests/test-cases/select-in-test.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,4 @@ The select field does not pick up the module sources for the test stanza
correctly. This is a bug.

$ dune runtest
File "dune", line 3, characters 10-14:
3 | (modules test)
^^^^
Error: Module Test doesn't exist.
[1]
Test: Unix was found!

0 comments on commit 093170f

Please sign in to comment.