beakerlib-virtualX (1) - Linux Manuals
beakerlib-virtualX: virtualX - Helpers for handling virtual X server
NAME
BeakerLib - virtualX - Helpers for handling virtual X server
DESCRIPTION
This module provides a simple way to start and stop virtual X server (framebuffer).FUNCTIONS
Virtual X Server
Functions providing simple way how to start and stop virtual X server.rlVirtualXStart
Start a virtual X server on a first free display. Tries only first N displays, so you can run out of them.
rlVirtualXStart name
- name
- String identifying the X server.
Returns 0 when the server is started successfully.
rlVirtualXGetDisplay
Get the DISPLAY variable for specified virtual X server.
rlVirtualXGetDisplay name
- name
- String identifying the X server.
Displays the number of display where specified virtual X server is running to standard output. Returns 0 on success.
rlVirtualXStop
Kill the specified X server.
rlVirtualXStop name
- name
- String identifying the X server.
Returns 0 when the server is stopped successfully.
Example
Below is a simple example of usage. Note that a lot of usefull debugging information is reported on the DEBUG level, so you can run your test with "DEBUG=1 make run" to get them.
rlVirtualXStart $TEST rlAssert0 "Virtual X server started" $? export DISPLAY="$( rlVirtualXGetDisplay $TEST )" # ...your test which needs X... rlVirtualXStop $TEST rlAssert0 "Virtual X server killed" $?
These are ``Requires'' lines for your scripts - note different package names for different RHEL versions:
@echo "Requires: xorg-x11-server-Xvfb" >> $(METADATA) # RHEL-5 @echo "Requires: xorg-x11-Xvfb" >> $(METADATA) # RHEL-4 @echo "Requires: XFree86-Xvfb" >> $(METADATA) # RHEL-3
AUTHORS
- •
- Jan Hutar <jhutar [at] redhat.com>
- •
-
Petr Splichal <psplicha [at] redhat.com>