Add "side-log" support to cram tests

Open
#5,152 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ocaml

Research direction

Start by tracing how Dune runs cram tests and prints failure diffs, then inspect the cram test failure path and its CI behavior. Define how a side-log is created and exposed through DUNE_CRAM_LOG, and consider both a file path and file descriptor before implementing output after a failure diff. Done means side-log content is shown for failures without changing normal successful test output.

Written by the indexing model from the issue text.

Description

accepted proposal

When a cram tests fail, it would be useful to see additional log output that is not necessarily reproducible. Such as inotify events. This would be especially useful for transient failures, especially when then happen in the CI.

The idea would be to provide a side-log mechanism to cram tests and have Dune print this log after the diff in case of failure. For instance, Dune could set an environment variable DUNE_CRAM_LOG pointing to the side log file (or containing the number of a fd open to the side-log file).

Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 17m
Merged PRs (30d)
287

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ocaml/dune

All issues in ocaml/dune

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.