← Back to team overview

drizzle-discuss team mailing list archive

Re: GSoC - Add a Proper Unit Testing Framework to Drizzle


On 04/05/2010 07:55 AM, Paweł Blokus wrote:
3. adding a new build target like 'make unittest' which would run the

Yep, in the main root directory's Makefile.am.  Again, monty may have
some ideas on how best to structure changes to the configure and
makefiles, though.  I will defer to his judgment here.

No- the unittests should be added to the automake testing system as
check_PROGRAMS. I have done this in my version of Pawel's branch.  This way
the unittests get run on make check and on make distcheck and the output
gets integrated in a decent manner.

I thought whether I should do it that way and was not sure. Currently
the 'check' target is used for performing the regression tests, should
they be performed together with the unit tests? If yes, I think there
should be also a way of running unit tests only, unless we count
running them from the command line as a valid method. I'm just not
sure what's the standard here :)

Well - the main key is that we want _all_ tests to run when we do a make distcheck. However - you can run just the check_PROGRAMS based tests by running make check-TESTS

Ok. I take back my backing of boost::test - because we still have to build
on CentOS/RHEL 5. The version of boost there is old enough that the API for
boost::test is considerably different. It could work - but I believe will
wind up being a pain in the ass enough that the extra depend of gtest would
be worth it.

So I'm back on gtest with Jay. I'm working on testing gtest across the
platforms in our build farm right now - I'll let you know how that goes.

What is more, I was thinking about using gmock as the mocking
framework. From what I managed to research until now, boost also
provides some mocking functionality but it is poorly documented, tell
me if I'm wrong. That would be of course an additional pro for using

I would highly recommend against this - adding java dependencies to the build is too much. (Unless I'm looking at the wrong gmock) Do we have needs in the unittest system at the moment for a mocking framework? (I'm not saying we don't - I'm just wondering if you've identified anything specifically)


Follow ups