Skip to content

Conversation

@Leonidas-from-XIV
Copy link
Collaborator

The way the test is implemented, the code testing dune is always calling the (outside, Dune unter test) via its absolute path.

This change, extracted from #12902 calls Dune via absolute path but wraps it in an utility where argv[0] is set to "dune" instead of the absolute path, more closely resembling a call to dune build instead of (a hypothetical) /usr/bin/dune build.

@Alizter
Copy link
Collaborator

Alizter commented Dec 11, 2025

Maybe best to extract the utility out so we don't have to build it every time we run the test?

@Leonidas-from-XIV
Copy link
Collaborator Author

Sure; I've moved it to dune_cmd which has simplified the utility a bit as dune_cmd has its own simple command line parsing.

The way the test is implemented, the code testing dune is always calling
the (outside, Dune unter test) via its absolute path.

This change, extracted from ocaml#12902 calls Dune via absolute path but
wraps it in an utility where argv[0] is set to "dune" instead of the
absolute path, more closely resembling a call to `dune build` instead of
(a hypothetical) `/usr/bin/dune build`.

Signed-off-by: Marek Kubica <[email protected]>
This avoids having to quote variables in the content.

Signed-off-by: Marek Kubica <[email protected]>
Signed-off-by: Marek Kubica <[email protected]>
@Alizter Alizter merged commit b5e0e5a into ocaml:main Dec 15, 2025
30 checks passed
@Leonidas-from-XIV Leonidas-from-XIV deleted the nested-dune-call-part-0 branch December 15, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants