Skip to content

Checked output with dune build @runtest #149

Description

@NoahTheDuke

I know that the preferred method of running tests is to directly call the test function, typically through a symlink as per the Tutorial, but my current workflow is to use dune build @ocaml-index @runtest --watch --force for reasons not worth getting into here, and this overall works great.

However, I tried to use captured output (through ~checked_output) in a test and the tests are failing, pointing to a _build subdirectory for the capture stdout:

[RUN]   019e692ac0d5 File > parse_environment > prints nicely
[PASS*] 019e692ac0d5 File > parse_environment > prints nicely
• Checked output: stdout
• Missing file containing the expected output: tests/snapshots/example/019e692ac0d5/stdout
• Path to captured stdout: _build/testo/status/example/019e692ac0d5/stdout
• Path to captured log: _build/testo/status/example/019e692ac0d5/log
• Log (stderr) is empty.

I realize that this is probably the reason the tutorial recommends using a symlink, but I really like the --watch/rebuild-and-rerun dev cycle.

Is it possible to use dune build @runtest along with checked output?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions