Pranav Kant [2014-02-28 21:17 +0530]:
> Moreover, we can copy some of the test-data into homedir and then clean it
> up after tests complete. Continous do not have any problems with that but
> then running 'make check' on users local machine would break the user's
> homedir and some users might not like that at all.

Indeed you should write tests with the assumption in mind that they
might fail or crash at any point, so the "clean up afterwards"
approach is only generally useful for "real" temporary stuff in /tmp
where some clutter doesn't matter much.

For such kind of test data I found it more robust and even easier to
create a temporary dir with the desired contents, point
$HOME and possibly $XDG_{CONFIG,DATA,*}_HOME to that, and then run the
application. For example
https://git.gnome.org/browse/gvfs/tree/test/gvfs-test

HTH,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
_______________________________________________
desktop-devel-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to