dune
dune copied to clipboard
test stanza forget its deps aliases when a .expected file is present
Expected Behavior
Bound dependencies in test stanza should not depend on .expected file presence.
Actual Behavior
When .expected file is present, bound dependency variables are forgotten.
Reproduction
Here is a minimal case reproduction: $ tree . ├── dune ├── dune-project ├── empty └── foo.ml
$ cat dune (test (name foo) (deps (:bar empty)) (action (run %{test} %{bar})))
As you can see, we bind a dependency to bar. foo.ml is empty.
$ dune test Done: 9/11 (jobs: 1)
Now, I add a expectation to my test: $ touch foo.expected
And now, I expect the following result: $ dune test Done: 9/11 (jobs: 1)
Actual Behavior
Last command gives: dune test File "dune", line 4, characters 24-28: 4 | (action (run %{test} %{bar}))) ^^^^ Error: Unknown variable "bar" Done: 0/0 (jobs: 0)
Specifications
- Version of
dune: 2.7.0 - Version of
ocaml: 4.11.1 - Operating system (distribution and version): Ubuntu 20.04