Re: [Evolution-hackers] EWS: Broken server tests

2013-03-05 Thread Tristan
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
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] EWS: Broken server tests

2013-03-04 Thread Fabiano FidĂȘncio
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.

[0]:
fidencio@srv ~/src/gnome/evolution-ews/src/server/tests $ make check
make  testews
make[1]: Entering directory
`/home/fidencio/src/gnome/evolution-ews/src/server/tests'
make[1]: `testews' is up to date.
make[1]: Leaving directory
`/home/fidencio/src/gnome/evolution-ews/src/server/tests'
make  check-TESTS
make[1]: Entering directory
`/home/fidencio/src/gnome/evolution-ews/src/server/tests'
/libews/connections: Test Connections
Success : Created a new connection
Testing Autodiscovery
test-connection.c:128 con_test_autodiscover : password : xxx xxx
test-connection.c:129 con_test_autodiscover : email : f...@bar.boo
Testing postive case...

/bin/sh: line 5: 22369 Segmentation fault  (core dumped) ${dir}$tst
FAIL: testews
===
1 of 1 test failed
Please report to http://bugzilla.gnome.org/browse.cgi?product=evolution-ews
===
make[1]: *** [check-TESTS] Error 1
make[1]: Leaving directory
`/home/fidencio/src/gnome/evolution-ews/src/server/tests'
make: *** [check-am] Error 2
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.

Best Regards,
-- 
Fabiano FidĂȘncio
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers