Comment 4 for bug 1376423

Revision history for this message
Martin Pitt (pitti) wrote : Re: There is no easy and future-proof way of starting an app in a clean environment

Closing this as invalid seems a bit premature to me. If possible, a test should never mess with a production $HOME, but always use a temporary one. It's safer, allows running the test on a production machine like a developer's workstation, and also provides better isolation. If your answer is "well, then always run it on a throwaway phone", I really doubt that you run your tests very often, as it's just way too inconvenient to do so.

It's not that hard to set up a temporary session d-bus, upstart, env variables, and a temp $HOME to run tests in. autopkgtest has a script to do just that (http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/tree/setup-commands/ubuntu-touch-session) and it's working quite well. But it would be nicer to move that to a place where upstream tests can actually use it, instead of reinventing the wheel every time (and while the resulting script looks quite simple, it really took me some two hours to figure this out, as it's not really well documented).

I'm reopening for these reasons. If you still disagree, mark it as "wontfix" for U-A-L and we'll find another place, but I heavily disagree on "invalid". It's a very valid concern.