[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#445039: ITP: ocaml-reins -- data structure library for OCaml



skaller wrote:
Mike -- I believe you have unit test generator as part of this
package. In keeping with my belief packages should test themselves,
I wonder what you might suggest in this regard here?

Possibly a separate package which actually RUNS the unit tests
and depends on reins -- this code from this package is not
distributed to end users as such, instead, if the package
passes, then a 'certificate' is generated and THAT is the
contents of the 'binary' package.

Currently, the success of the test suite is a dependency of the default build target, so it is *always* runs whenever you build the project (unless a specific other target is given). Since they only take a few seconds to run there is no reason *not* to run them (ever IMHO).

Even if the tests took a *long* time to run, I don't see the benefit of having a separate package. Since the auto-builders would have to build the test package too, there is no savings there, so you should just run them as part of the build (as reins and felix do). I would also much rather see that a package of mine has some regression on a unusual architecture by failing to build than having to wait for some poor user who gets tripped up by the bug.

One result of the rise of Test Driven Development is that I think people (e.g., me) are seeing tests as a necessary part of any build process. In the context of OCaml, I see them as a convenient extension to the compiler for quasi-verifying program invariants that are too cumbersome to encode in the type system. So in that sense, running the test suite is really just another compiler pass :-p

-m



Reply to: