dbuenzli / topkg

The transitory OCaml software packager
http://erratique.ch/software/topkg
ISC License
69 stars 25 forks source link

`topkg test` doesn't support -n #100

Closed talex5 closed 7 years ago

talex5 commented 7 years ago

If I have multiple packages, I should be able to test all of them:

$ ocaml pkg/pkg.ml test -n prometheus-app
pkg.ml: [ERROR] unknown option `-n'

(from https://github.com/ocaml/opam-repository/commit/d1b35d45f63e085ceaae4fdbf4ee2093888ae785#commitcomment-20766305)

dbuenzli commented 7 years ago

I added the flag for consistency but in fact you don't need it. When you build a package with -n with tests, topkg writes your test specification in _build/_topkg.test it is then perfectly able to run them. You can test this with the current topkg in prometheus-app, ocaml pkg/pkg.ml test or ocaml pkg/pkg.ml test test will perfectly run them.

dbuenzli commented 7 years ago

However now that I'm on the way I will make that you can test packages in parallel which is not possible at the moment (since _build/_topkg.test if you build two different package).

dbuenzli commented 7 years ago

So I did that. Note that running topkg test will no longer run the tests of the last built package. It will now run the tests of the default package. In other words topkg test now fully mirrors the way topkg build work.