On Tue, 2013-03-05 at 03:33 +0100, Fabiano FidĂȘncio wrote: > server/tests were/are not building in git master. So, I did a patch > series (please, check: > https://bugzilla.gnome.org/show_bug.cgi?id=695177), fixing the build > problem. However, trying to run a "make check" > looks like the tests are broken themselves[0]. To run the tests, I > did: > - set EWS_TEST_USERNAME as a valid username > - set EWS_TEST_PASSWORD as a valid password > - set EWS_TEST_EMAIL as a valid exchange email address > - set EWS_TEST_URI as the URL for a valid exchange email server
[...] > Could someone(Tristan?) take a look in: > > https://bugzilla.gnome.org/show_bug.cgi?id=695177 > Is there someone (Tristan, maybe) taking care of those tests? > Any tips to fix the errors/set up correctly the environment are > welcome. > Hi, I did not look closely at your test cases per se, but I can give you a few pointers on how to get this working (note that I don't have a great understanding of what EWS is, actually). First of all, I suggest the following reading material; My recent blog post on the subject of testing D-Bus services: http://blogs.gnome.org/tvb/2012/12/20/isolated-unit-testing-of-d-bus-services/ EDS's test case fixture code which can be found here: http://git.gnome.org/browse/evolution-data-server/tree/tests/test-server-utils/e-test-server-utils.c (there is a .h also, but for some reason the html view of this file is broken, better just check it out in your EDS source code tree). What you probably want, is your own version of e-test-server-utils.[ch] to use for your EWS test case fixtures. However, since I suppose EWS depends on EDS to be installed, you're going to need to use installed EDS services. This means that when setting up GTestDBus, for now you'll need to call g_test_dbus_add_service_dir() to add the EDS services which you'll need to test with EWS (ideally I think you should be able to select specific service files to pull into your testing environment, but currently GTestDBus only let's you pull them in as a directory, which means your test environment will be contaminated by whatever services are installed in ${prefix}/share/dbus-1/services, which is 'good enough for now'). If you have your own in-tree modules to test as addressbook/calendar backends, you'll need to set some environment variables: EDS_ADDRESS_BOOK_MODULES and/or EDS_CALENDAR_MODULES These should be set to your local in-tree modules, for example: EDS_ADDRESS_BOOK_MODULES=${top_builddir}/ews/addressbook-module/.libs See specifically the function setup_environment() function in the EDS test case fixture code, since you are testing with an installed EDS in the environment, you'll probably need to point GSETTINGS_SCHEMA_DIR to the real installed schema directory in the given prefix (otherwise EDS will complain, because EDS needs it's own schemas to startup properly). Note that what you're trying to do is a little different from EDS, since EDS is pretty self-contained and does not depend on external installed services to run, while EWS requires the installed copy of EDS, this will present a challenge for you. Hope this was helpful, good luck ;-) Cheers, -Tristan _______________________________________________ evolution-hackers mailing list [email protected] To change your list options or unsubscribe, visit ... https://mail.gnome.org/mailman/listinfo/evolution-hackers
