kdelibs (at least) : test building by default

Henry Miller hank at millerfarm.com
Sat Oct 6 13:42:04 BST 2007


On Saturday 06 October 2007 03:16:28 Thomas Zander wrote:

> I've seen often that new people start hacking on a module and have no idea
> about unit tests until a commit breaks them and you approach that person
> asking if he can fix his mistake.  The most often seen response is that
> he was unaware of the tests. And asking to type 'make test' thus has
> little effect and its just really hard to point to the right test and get
> him to fix the problem.
> Enabling the compiling of the tests by default means all you need to do is
> cd into the dir you changed and type 'make test' and you instantly see if
> there is a regression.

Random musing follow.   I suspect some of the following can't be done, at 
least not without getting code changes from the upstream build systems.  Each 
idea is intended to stand alone, in combonation they may not make sense.

It would be nice to RUN one test at random for each make,or at least make with 
DEBUG, those who building without debug either wouldn't know how to fix a 
breakage, or know how to run tests anyway.  Of course we need to make sure 
tests that need X, or would in some other way effect/depend on your 
environment are never run this way.    The idea is that if something breaks, 
someone sees it, but the time taken by tests isn't significant.

If someone is running make -jn (for some n or greater), they have enough cpu 
power to run all tests that run standalone (no X), and they should get them 
automatically.   Someone running make -j1 is stuck on a slow machine, we 
don't want to slow them down even more by running all tests.  (AFAIK make 
cannot handle this)

Of course none of the above is a substitution for running all tests before 
checking in, which should still be habit.   




More information about the kde-core-devel mailing list