diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-15 17:21:08 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-28 16:03:56 +1000 |
commit | 4eac0df060b897470fb01cfd3b70f500da757c74 (patch) | |
tree | aa840bb21aca0d74720109e1496abd8337b36308 /configure.ac | |
parent | c2c515ead38d9a6c9eae0b83aa7a82208f177b7e (diff) |
Add a test-suite for in-server unit-testing.
This patch adds a test/ directory that contains the setup for a unit-testing
suite designed for in-server unit-testing. All functions available to the X
server are available to the test binaries through static linking.
This test suite uses the glib testing framework.
Do not use glib calls outside of the test/ directory.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d907e8887..d95b2e8aa 100644 --- a/configure.ac +++ b/configure.ac @@ -439,6 +439,9 @@ AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debugging (default: disabled)]), [DEBUGGING=$enableval], [DEBUGGING=no]) +AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], + [Enable unit-tests (default: enabled)]), + [UNITTESTS=$enableval], [UNITTESTS=yes]) AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), [INT10="$withval"], [INT10="$DEFAULT_INT10"]) @@ -1141,6 +1144,14 @@ if test "x$DEBUGGING" = xyes; then fi AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) +if test "x$UNITTESTS" = xyes; then + AC_DEFINE(UNITTESTS, 1, [Enable unit tests]) + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16]) + AC_SUBST([GLIB_LIBS]) + AC_SUBST([GLIB_CFLAGS]) +fi +AM_CONDITIONAL(UNITTESTS, [test "x$UNITTESTS" = xyes]) + AC_DEFINE(XTEST, 1, [Support XTest extension]) AC_DEFINE(XSYNC, 1, [Support XSync extension]) AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) @@ -1980,5 +1991,6 @@ hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/sdl/Makefile hw/kdrive/src/Makefile +test/Makefile xorg-server.pc ]) |