ocaml-git icon indicating copy to clipboard operation
ocaml-git copied to clipboard

Some packages have test-dependencies and a test phase in opam files, but no tests

Open sternenseemann opened this issue 3 years ago • 4 comments

Some sub packages indicate that they have tests and even a test phase, but don't have any tests if dune runtest -p PACKAGENAME is executed:

  • git-cohttp
  • git-cohttp-mirage
  • git-cohttp-unix
  • carton-git

sternenseemann avatar Jan 16 '21 13:01 sternenseemann

Yes, the problem came from the release of 3.0.0 to avoid a cyclic dependency between packages and dune's artifacts. For instance, git-nss was removed because tests need git but, for the point-of-view of OPAM packages (which is not the dune point-of-view), git depended on git-nss.

For the development purpose on the current dev repository, a simple dune runtest or dune build executes/compiles all tests and the OCaml-CI (but it's not the case for Travis and AppVeyor which rely on the OPAM view). In other words, in our development process, we don't miss any tests :+1:.

But more specially about this package, of course, the dune runtest -p name given by the OPAM file is useless for some of these packages. For my point of view, I prefer an homogeneous pattern for all of my OPAM files even if such line become useless. Is it a problem for you?

dinosaure avatar Jan 16 '21 14:01 dinosaure

I've been working on updating git in nixpkgs and found it a bit confusing because from the opam files I got the impression that those packages have individual tests and was confused when the log showed non being run, but it's not really a problem, just possibly confusing.

Reducing the number of packages having tests is actually better for nixpkgs because we have had to disable a few tests from the extended mirage universe already, since tests and packages are coupled together, so stuff like irmin's tests depending on ppx_irmin and vice versa means we have to disable them both.

sternenseemann avatar Jan 16 '21 15:01 sternenseemann

I see, so I will let this issue open until we remove dune runtest from these packages if it's urgent.

dinosaure avatar Jan 16 '21 16:01 dinosaure

Not urgent at all, but this issue may also clarify things for anyone else wondering :)

sternenseemann avatar Jan 16 '21 16:01 sternenseemann