File tree Expand file tree Collapse file tree
test/blackbox-tests/test-cases/optional-executable.t Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,4 +128,32 @@ present even if the binary is not optional.
128128 $ PATH =./bin :$PATH dune build @run-x
129129 binary path : $TESTCASE_ROOT /optional-binary-absent /./bin /dunetestbar
130130
131+ Optional on the executable should be respected :
132+
133+ $ cat >exe /dune <<EOF
134+ > (executable
135+ > (public_name dunetestbar)
136+ > (libraries does-not-exist)
137+ > (optional)
138+ > (name bar))
139+ > EOF
140+
141+ $ PATH =./bin :$PATH dune build @run-x
142+
143+ In the same way as enabled_if :
144+
145+ $ cat >exe /dune <<EOF
146+ > (executable
147+ > (public_name dunetestbar)
148+ > (enabled_if false)
149+ > (name bar))
150+ > EOF
151+
152+ $ PATH =./bin :$PATH dune build @run-x
153+ Error : No rule found for install bin /dunetestbar
154+ - > required by %{bin:dunetestbar } at dune: 3
155+ -> required by alias run-x in dune: 1
156+ [1 ]
157+
131158 $ cd ..
159+
You can’t perform that action at this time.
0 commit comments