da887726ee
make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. v2: Fix Linux bits: Add #include <errno.h> to get a declaration of program_invocation_name on Linux. Use only the last portion of the pathname so that the resulting display name doesn't contain any slashes. v3: use program_invocation_short_name on Linux This is the same as program_invocation_name, except is has stripped off any path prefix. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> |
||
---|---|---|
.. | ||
xi2 | ||
.gitignore | ||
ddxstubs.c | ||
fixes.c | ||
hashtabletest.c | ||
input.c | ||
list.c | ||
Makefile.am | ||
misc.c | ||
os.c | ||
README | ||
signal-logging.c | ||
string.c | ||
touch.c | ||
xfree86.c | ||
xkb.c | ||
xtest.c |
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