xserver/test
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alan Coopersmith 84207def93 Disable building of tests requiring DDX functions when Xorg is not built
Some test cases require linking with some sort of DDX - ideally we'd
have a stub ddx for testing, but for now, since we link with the Xorg
ddx, disable those tests when configured with --disable-xorg

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43320

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-02 16:02:56 -08:00
..
xi2 Enable memory checking during unit testing 2011-11-23 12:15:05 -08:00
.gitignore Add fallback implementation of strndup() 2011-11-23 12:15:05 -08:00
fixes.c fixes: Add support for pointer barriers 2011-05-31 15:10:51 -04:00
input.c test: Add unit test for mieq 2011-10-21 00:32:04 -07:00
list.c Add null-terminated list interface. 2011-08-22 15:56:53 +10:00
Makefile.am Disable building of tests requiring DDX functions when Xorg is not built 2011-12-02 16:02:56 -08:00
misc.c test: remove unneeded printf statements from misc.c 2011-11-29 15:13:37 +10:00
README Add a test-suite for in-server unit-testing. 2009-04-28 16:03:56 +10:00
string.c Add fallback implementation of strndup() 2011-11-23 12:15:05 -08:00
xfree86.c xfree86: fix potential buffer overflow 2011-10-31 09:39:04 +10:00
xkb.c test: remove glib dependency 2011-04-21 13:43:43 +10:00
xtest.c test: remove glib dependency 2011-04-21 13:43:43 +10:00

                        X server test suite

This suite contains a set of tests to verify the behaviour of functions used
internally to the server. This test suite is based on glib's testing
framework [1].

= How it works =
Through some automake abuse, we link the test programs with the same static
libraries as the Xorg binary. The test suites can then call various functions
and verify their behaviour - without the need to start the server or connect
clients.

This testing only works for functions that do not rely on a particular state
of the X server. Unless the test suite replicates the expected state, which
may be difficult.

= How to run the tests =
Run "make check" the test directory. This will compile the tests and execute
them in the order specified in the TESTS variable in test/Makefile.am.

Each set of tests related to a subsystem are available as a binary that can be
executed directly. For example, run "xkb" to perform some xkb-related tests.

== Adding a new test ==
When adding a new test, ensure that you add a short description of what the
test does and what the expected outcome is. If the test reproduces a
particular bug, using g_test_bug().

== Misc ==

The programs "gtester" and "gtester-report" may be used to generate XML/HTML
log files of tests succeeded and failed.

---------

[1] http://library.gnome.org/devel/glib/stable/glib-Testing.html