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

Carl Worth cworth at cworth.org
Mon Sep 20 16:46:15 PDT 2010


On Mon, 20 Sep 2010 15:33:09 -0700, Carl Worth <cworth at cworth.org> wrote:
> 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).

I've now implemented this. I did it slightly differently, making
test-lib.sh provide an empty database by default and allowing tests to
call a new add_email_corpus function if they need a bunch of email to
work with.

That's because it turns out that many of the existing tests really do
want to focus only on a few, carefully-controlled messages (think about
the tests for "notmuch reply" for example).

> 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.

I did do it this efficient way. It's only being used currently by the
search and dump-restore tests, so that efficiency doesn't matter too
much yet. But I do expect many more tests to start using this
functionality soon.

-Carl

-- 
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/29259830/attachment.pgp>


More information about the notmuch mailing list