Add helpers to redirect XDG_*_HOME to a temp dir for unit tests
@xclaesse
Submitted by Xavier Claessens Link to original bug (#674197)
Description
Some unit tests may want to write in ~/.cache but does not want to mess up with user's files. In that case the unit test needs to set XDG_CACHE_HOME to /tmp/something.
This gets tricky to cleanup the directory in the case the unit test crash for example. We could profit of the watcher process we fork in gtestdbus.c (see bug #672985) and make that process also cleanup the temp dirs.
Version: 2.29.x