So I have an executable only used for testing that uses extracted code. This makes an otherwise pure-OCaml project suddenly depend on a Coq library. Is there an obvious way to make sure the executable is only built when doing dune -p myproj runtests
? I don't want everyone to have to install the Coq library just to install the OCaml project, unless they actually want to run the tests.
Karl Palmskog said:
So I have an executable only used for testing that uses extracted code. This makes an otherwise pure-OCaml project suddenly depend on a Coq library. Is there an obvious way to make sure the executable is only built when doing
dune -p myproj runtests
? I don't want everyone to have to install the Coq library just to install the OCaml project, unless they actually want to run the tests.
What about just excluding the test from your OCaml package? If the tests aren't part of @install
, then dune -p
would not build them
ah, I see, so basically one doesn't expose the test externally at all, I guess this is indeed an option, thanks.
Last updated: Oct 13 2024 at 01:02 UTC