The resulting approach is using X server, so it won't work on Windows.
$-prefixed commands as a regular user, #-prefixed as root
1. Launch a shell for testing (console or xterm are both fine).
2. Prepare the shell to work with the second X screen:
$ export DISPLAY=:2.0
3. Set path to xauth key file:
$ export XAUTHORITY=~/.Xauthority2
4. Edit your xorg.conf to create a dummy server layout:
4.1 Add Dummy "Device":
Identifier "Dummy Video Card"
4.2 Add Dummy "Screen":
Identifier "Dummy Screen"
Device "Dummy Video Card"
// Use any monitor from you exisiting config here
Monitor "Generic Monitor"
4.3. Create Dummy "ServerLayout"
Screen "Dummy Screen"
// Use any keyboard from you exisiting config here
InputDevice "Generic Keyboard"
// Use any mouse from you exisiting config here
InputDevice "Configured Mouse"
5. Run the second Dummy X server:
5.1 From another console:
$ XAUTHORITY=~regular_username/.Xauthority2 startx -- :2.0 -layout Dummy
5.2 From another ssh/xterm as root:
# XAUTHORITY=~regular_username/.Xauthority2 startx -- :2.0 -layout Dummy
5.2.1 Allow regular user to connect:
# chown regular_username ~regular_username/.Xauthority2
6. Run mochitest from the first console:
$ cd $(OBJDIR)/_tests/testing/mochitest
$ nice python runtests.py --log-file=~/mochitest.log --file-level=DEBUG
Despite nice, the mochitest suite runs ~10% faster on dummy screen, than
on my normal screen, not telling about virtual machine. And I can work
normally while tests run.
Good luck trying this,
Is there any way we could just fold this or something like it into the default run environment? I've not fooled with using multiple X servers that much except a brief spate of Xnesting when I attempted to fix a gnome-panel bug back in the day and needed a different X display for gdbing purposes, but it seems like it should be possible to require neither root access nor any manual effort beyond a single commandline argument to runtests.py.
I filed bug 434365 to deal with this on Linux, probably with a commandline option. If you have any suggestions, feedback, patches you could drop in there on how to make something like what you suggest "just work", I know a lot of people who'd love to hear it. For anyone in m.d.p.linux, this would be an easy way to make a big impact on development on Linux.
I dithered on where this thread should continue and eventually decided the Linux newsgroup rather than the current one, since the current scheme is only useful on an X-running platform and is hopelessly nonportable to Windows or OS X. If you're not already reading the Linux group, the load's very light, and we could use some fresh blood and enthusiasm there anyway.
$ nice xvfb-run --auto-servernum python runtests.py
--log-file=~/mochitest.log --file-level=DEBUG --autorun
The only requirement is Xvfb package .
I've always known Linux is the right platform to hack Mozilla, but I've
never thought it'll be so awesome!