[PATCH v3 0/5] Git-based modularization of test suite

Carl Worth cworth at cworth.org
Mon Sep 20 15:33:09 PDT 2010


> Michal Sojka (5):
>   Copy test framework from Git
>   Update test framework for use with notmuch
>   test: Update helper functions
>   Convert the actual tests to the new framework
>   test: Set all times to UTC

Hi Michal,

Thanks for sending this, (and patiently sending in three versions of
it).

I've now pushed this out, along with some changes of my own on top of
it. My changes make things in the test suite look more like they did
before the git-based modularization, (both output from the test suite
and how the tests themselves are written). I couldn't stand the approach
of doing long chains of shell commands within strings for the tests, and
I also didn't like the numeric filenames.

Take a look at what I've done, and let me know if I defeated any
intended benefits of the git-based modularization of the test suite.

One problem with the current arrangement is that all tests now start
with an empty database of messages. This means that the search tests
aren't giving as much test coverage. And the dump/restore tests are
actually testing nothing at all!

I think what I'd prefer to have is for test-lib.sh to populate a
non-empty database (it could even provide a function to reset the
database to empty for any tests that actually want that).

For efficiency, the non-empty database could be created just once at the
first invocation and then could simply be copied into place for future
invocations.

If anyone wants to help fix that, that would be great.

-Carl

PS. The valgrind support[*] in the newly modularized test suite helped
me find a use-after-free bug in the current code base, so that's already
a useful result here. Thanks again!

[*] The valgrind support isn't ideal yet since it's not actually
flagging failures since the test suite isn't currently looking at return
values of valgrind/notmuch. This is arguably my fault since I got rid of
the ugly 'command && another_command && yet_another_command' syntax. I'd
like to see a way to fix the valgrind support without introducing that
awful syntax. I'm open to ideas.

-- 
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100920/fcf280e3/attachment.pgp>


More information about the notmuch mailing list