[Evolution-hackers] Regarding addressbook migration test case



Good morning,

   I've been meaning to write this email since over a week
ago when I added a new addressbook migration test case in EDS[0].

Not only because this is one of the more interesting tests
we now have in EDS, but because this test requires some
additional maintenance which normal tests don't require.

The maintenance in question is pretty simple, every
stable release (directly after branching for the next
stable release would be the ideal time) a new case
needs to be added to the addressbook migration test.

I've tried to make this as painless as possible,
in order to add a new release to the list of tested
stable releases, one needs to do the following:

  cd ~/path/to/evolution-data-server
  make -C tests/book-migration setup-migration
  git add tests/book-migration/db/3.12/contacts.db
  gedit tests/book-migration/db/3.12/Makefile
        (add contacts.db to EXTRA_DIST)

For reference, you can see this commit[1] which adds
EDS 3.10 to the list of releases to test.

As I'm not the one doing the releases, I'd be happy
to hear from Matthew and Milan and tie this up
more neatly. Is there anything I should add to this ?
Perhaps at least a README file describing the test in
detail in the tests/book-migration directory ?

I've included some more details about this test
below.

Cheers,
    -Tristan

[0]:https://git.gnome.org/browse/evolution-data-server/commit/?id=ca64872e132770264f59b49418f5304c8c89e832
[1]:https://git.gnome.org/browse/evolution-data-server/commit/?id=e79ec2c889a0b302c532508e5d8ed51caa07b066

Details on the test itself:

  o The tests/book-migration/vcards/ directory contains the vcards
    which are expected to be found in the migrated sandboxes.

  o The tests/book-migration/db/ directory contains subdirectories
    which are named by EDS stable version,
    e.g. tests/book-migration/db/3.0

    These directories contain data collected from previous 
    versions of EDS (compiled on my computer).
    For the old BDB format, db_dump and db_load
    is used to reconstruct the addressbook, to avoid
    binary incompatibility.

  o The program tests/book-migration/setup-migration-test is a simple
    stand alone program which creates an addressbook and inserts some
    contacts.

    This program can be compiled with versions of EDS dating back
    to 3.0, so it can potentially be used to repopulate all of the
    migration sandboxes from scratch, should the need ever arise
    (this could happen if we fix a migration bug but are unable
    to reproduce the bug using the data migrated from our set
    of vcards, repopulating the sandboxes from scratch is time
    consuming though so we ultimately want to avoid this).

  o tests/book-migration/Makefile.am includes a 'setup-migration'
    rule which creates a new sandbox using the vcards in
    tests/book-migration/vcards/.

  o The test case tests/book-migration/test-migration.c contains
    a suite of basic tests which test EBookClient apis on a freshly
    upgraded/migrated addressbook.

    As a part of the test fixture for each test, the sandbox is
    prepared using the sandboxes in tests/book-migration/db/.

    This test expects that all of the contacts listed in
    tests/book-migration/vcards/ are present in the freshly
    opened and migrated addressbook.




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