-
Notifications
You must be signed in to change notification settings - Fork 459
Closed
ocaml/opam-repository
#29096Labels
cramRelated to the cram test execution in DuneRelated to the cram test execution in Dunefeature-requestUser wanted featuresUser wanted features
Description
Desired Behavior
dune runtest ignores any line that does not start with whitespace in .t files . It is handy for describing the tests but it has some unintended consequences: merge-conflict markers (i.e. <<<<<<<<) are completely ignored by dune.
The latter combined with the auto-promote feature can lead to the following scenario.
- A user rebases on a branch with conflicts inside test
.tfiles. - He observes a lot of conflicts and resolve them.
- The user forgets about conflict markers in the tests and runs
dune runtest --auto-promote. - The tests are successfully promoted.
- The conflict markers remain in the tests since they have been ignored both by dune and by the user due to many changes in the test output.
Example
Dune might issue a warning if it detects tests with conflict markers. For instance if we have the following tests/1.t file.
$ Chro input1.smt2
unsat
<<<<<<< HEAD
=======
>>>>>>> ee7647e4 (project: add feature)
$ Chro input.smt2
sat (underapprox1)
Running this test may result with the following warning.
Merge conflict markers detected in `tests/1.t` on lines 3-5
Metadata
Metadata
Assignees
Labels
cramRelated to the cram test execution in DuneRelated to the cram test execution in Dunefeature-requestUser wanted featuresUser wanted features