Re: [Evolution-hackers] "make check" failing in the e-d-s gnome-2-32



Le jeudi 09 juin 2011 à 06:24 -0400, Matthew Barnes a écrit :
> Resending since my original reply never made it to the mailing list for
> some reason...
> 
> -------- Forwarded Message --------
> From: Matthew Barnes <mbarnes redhat com>
> To: Murray Cumming <murrayc murrayc com>
> Cc: evolution-hackers gnome org, Tristan Van Berkom
> <tristanvb openismus com>
> Subject: Re: [Evolution-hackers] "make check" failing in the e-d-s
> gnome-2-32
> Date: Wed, 08 Jun 2011 09:32:24 -0400
> 
> On Wed, 2011-06-08 at 10:10 +0200, Murray Cumming wrote:
> > An environment variable can be set easily, for all tests, and maybe for
> > individual tests, like so in addressbook/tests/ebook/Makefile.am:
> > 
> > +test_dir_base = "/tmp/ebook-test-yadda/"
> > +TESTS_ENVIRONMENT = \
> > +       XDG_DATA_HOME=${test_dir_base}
> > 
> > However, the necessary value for XXXXXX can only be known after the test
> > has started, right?
> 
> You could probably get away with just using a date stamp instead of
> random characters for XXXXXX.  The key is really for each address book
> to have its own unique ESource ID.  The backend will create a separate
> directory per address book under whatever we choose as the base dir.
> 
> The tricky part is the D-Bus service is what really needs the custom
> XDG_DATA_HOME, since that's where the file backend lives and only it's
> supposed to know where the data is really stored.  But unfortunately our
> test framework doesn't start the D-Bus service itself -- that's still a
> manual step before running the tests.
> 
> To really automate the whole thing, the test environment is gonna have
> to set up some kind of private D-Bus session and launch the address book
> service prior to running the client-side tests, and then clean up after
> itself.  I think that's possible but it's a bit beyond my expertise at
> the moment.
> 
> You can kinda see why I've been dragging my feet about fixing the tests.
> Haven't had enough spare cycles to really do it properly.

For the e-d-s backend in libfolks (not merged into master yet) we do the
following for our tests:

- set XDG_DATA_HOME, XDG_CACHE_HOME and XDG_CONFIG_HOME to a temp dir
- start new session bus
- run tests
- clean up temp dir

Relevant files:

http://cgit.collabora.com/git/user/rgs/folks/tree/tests/eds/Makefile.am?h=eds-0.5
http://cgit.collabora.com/git/user/rgs/folks/tree/tests/tools/with-session-bus-eds.sh?h=eds-0.5
http://cgit.collabora.com/git/user/rgs/folks/tree/tests/tools/eds.sh?h=eds-0.5

Cheers,
Raúl




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