diff options
author | Jonathon Jongsma <jjongsma@gnome.org> | 2009-01-12 14:45:20 -0600 |
---|---|---|
committer | Jonathon Jongsma <jonathon.jongsma@collabora.co.uk> | 2009-01-15 11:33:16 -0600 |
commit | e14ecf6c650b3da01f59094c4d7b74d29543d7e1 (patch) | |
tree | 5e54fd39b0aab16607db3dcf01f532344286fce2 /configure.ac | |
parent | e798493ed8dc4e5d68035a3362da4e29884d9816 (diff) |
Starting to add twisted test infrastructure
The twisted test infrastructure was copied and modified from gabble. I'm still
getting familiar with it and figuring out how things work, so it doesn't really
do much yet and there are even issues with the few barebones tests I've included
here.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ec834a3..057e6c5 100644 --- a/configure.ac +++ b/configure.ac @@ -103,6 +103,24 @@ if test -z "$PYTHON"; then AC_MSG_ERROR([Python is required to compile this package]) fi + +dnl check for a version of python that can run the twisted tests +AC_MSG_CHECKING([for Python with Twisted and IRC protocol support]) +for TEST_PYTHON in python2.5 python2.6 python; do + if $TEST_PYTHON -c "from sys import version_info; import dbus, dbus.mainloop.glib; raise SystemExit(version_info < (2, 5, 0, 'final', 0))" >/dev/null 2>&1; then + if $TEST_PYTHON -c "import twisted.words.protocols.irc, twisted.internet.reactor" >/dev/null 2>&1; then + AM_CONDITIONAL([WANT_TWISTED_TESTS], true) + break + else + TEST_PYTHON=no + fi + fi +done +AC_MSG_RESULT([$TEST_PYTHON]) +AC_SUBST(TEST_PYTHON) +AM_CONDITIONAL([WANT_TWISTED_TESTS], test xno != x$TEST_PYTHON) + + AS_AC_EXPAND(DATADIR, $datadir) DBUS_SERVICES_DIR="$DATADIR/dbus-1/services" AC_SUBST(DBUS_SERVICES_DIR) @@ -114,5 +132,7 @@ AC_OUTPUT( Makefile \ m4/Makefile \ src/Makefile \ tests/Makefile \ + tests/twisted/Makefile \ + tests/twisted/tools/Makefile \ tools/Makefile \ ) |