Closed Bug 548172 Opened 10 years ago Closed 10 years ago
thunderbird mozmill test runner on linux should use Xvnc via vncserver when available
Trying to run the mozmill tests outside of a VM on linux is maddening; there's windows flashing all over the place and perturbation of the selection/focus is likely in ways that will break the unit tests. It turns out it's pretty easy to use the vncserver script to spin up and kill Xvnc instances. There are 2 potentially relevant configuration issues: 1) The user must have created a password at ~/.vnc/passwd. This is nominally accomplished by using the "vncpasswd" script. I think the vncserver script will prompt when invoked, but likely only in an interactive context, and I'm not sure if our invocation counts as interactive. 2) The default xstartup script (~/.vnc/xstartup) at least on my system uses the default X startup junk from /etc. That may start up more than the developer really wants spun up in the testing session. For example, when I connected with vncviewer I noticed that my gnome-panel was in there running a system monitor. I personally have whacked my xstartup file to lose the /etc stuff and just invoke xfwm4 (the xfce window manager which I specially installed): ------ #!/bin/sh vncconfig -iconic & unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS OS=`uname -s` xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & xfwm4 & ------
Attachment #428595 - Flags: review?(bugzilla)
Comment on attachment 428595 [details] [diff] [review] v1 use vncserver when available I don't really know vncserver & co, but the idea sounds fine, let's give it a try.
Attachment #428595 - Flags: review?(bugzilla) → review+
pushed to comm-central: http://hg.mozilla.org/comm-central/rev/6e94b4293dd2 In order to reduce the probability of confusing unhappiness, I made it require that the ~/.vnc/passwd file exists before it will try and run vncserver too. I have documented this capability and how to use it here: https://developer.mozilla.org/en/Thunderbird/Thunderbird_MozMill_Testing#section_7
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Shouldn't the vncserver binary path be configurable? <http://packages.ubuntu.com/search?searchon=contents&keywords=vnc&mode=filename&suite=karmic&arch=any>
(In reply to comment #3) > Shouldn't the vncserver binary path be configurable? Configurable sounds like hassle for everyone. If someone on Ubuntu Karmic can verify a script path that works and also update the wiki to explain what package to install, then they should provide a patch.
FWIW, I mean something like: VNC_SERVER_PATH = '/usr/bin/vncserver' if (env['MOZ_VNC_SERVER_PATH']) VNC_SERVER_PATH = env['MOZ_VNC_SERVER_PATH']
Comment on attachment 428595 [details] [diff] [review] v1 use vncserver when available >+ try: >+ return mozrunner.ThunderbirdRunner.wait(self, timeout) >+ finally: >+ try: >+ if self.vnc_alive: self.vnc_alive isn't set at all if self.use_vnc_server is false, so this throws.
Works nicely. Thanks asuth!
You need to log in before you can comment on or make changes to this bug.