README revision 6747b715
16747b715Smrg X server test suite 26747b715Smrg 36747b715SmrgThis suite contains a set of tests to verify the behaviour of functions used 46747b715Smrginternally to the server. This test suite is based on glib's testing 56747b715Smrgframework [1]. 66747b715Smrg 76747b715Smrg= How it works = 86747b715SmrgThrough some automake abuse, we link the test programs with the same static 96747b715Smrglibraries as the Xorg binary. The test suites can then call various functions 106747b715Smrgand verify their behaviour - without the need to start the server or connect 116747b715Smrgclients. 126747b715Smrg 136747b715SmrgThis testing only works for functions that do not rely on a particular state 146747b715Smrgof the X server. Unless the test suite replicates the expected state, which 156747b715Smrgmay be difficult. 166747b715Smrg 176747b715Smrg= How to run the tests = 186747b715SmrgRun "make check" the test directory. This will compile the tests and execute 196747b715Smrgthem in the order specified in the TESTS variable in test/Makefile.am. 206747b715Smrg 216747b715SmrgEach set of tests related to a subsystem are available as a binary that can be 226747b715Smrgexecuted directly. For example, run "xkb" to perform some xkb-related tests. 236747b715Smrg 246747b715Smrg== Adding a new test == 256747b715SmrgWhen adding a new test, ensure that you add a short description of what the 266747b715Smrgtest does and what the expected outcome is. If the test reproduces a 276747b715Smrgparticular bug, using g_test_bug(). 286747b715Smrg 296747b715Smrg== Misc == 306747b715Smrg 316747b715SmrgThe programs "gtester" and "gtester-report" may be used to generate XML/HTML 326747b715Smrglog files of tests succeeded and failed. 336747b715Smrg 346747b715Smrg--------- 356747b715Smrg 366747b715Smrg[1] http://library.gnome.org/devel/glib/stable/glib-Testing.html 37