From ec46634c4c3d1f185c6cc59dd0acf6e056a2bb2e Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Thu, 11 Jun 2026 18:07:11 -0400 Subject: [PATCH] decouple test outptus from dune paths The `%{bin:...}` variable form is expanded to a path to the executable, but the exact name of the executable file at that path is subject to change as an implementation detail of dune's internals so relying on this path for textual output in test fixtures is not stable. The location of this path is changing in dune 3.34, which would cause these tests to fail. Decoupling reference to the executable name from specification of the dependency will ensure a stable result in the tests. --- test/dune | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/dune b/test/dune index f5e01dc..6e3318b 100644 --- a/test/dune +++ b/test/dune @@ -1,15 +1,16 @@ (rule (targets t1.ml t1.mli t1_plain.ml t1_plain_ext.ml) (deps - (source_tree t1)) + (source_tree t1) + %{bin:ocaml-crunch}) (action (setenv SOURCE_DATE_EPOCH 0 (progn - (run %{bin:ocaml-crunch} --mode=lwt -o t1.ml t1) - (run %{bin:ocaml-crunch} --mode=plain -o t1_plain.ml t1) - (run %{bin:ocaml-crunch} --mode=plain -e ext -o t1_plain_ext.ml t1))))) + (run ocaml-crunch --mode=lwt -o t1.ml t1) + (run ocaml-crunch --mode=plain -o t1_plain.ml t1) + (run ocaml-crunch --mode=plain -e ext -o t1_plain_ext.ml t1))))) (rule (alias runtest)