summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-11 15:26:21 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-05 13:49:26 +0100
commit14d9392180a78ef14b2cc6cdd1d499eac030455c (patch)
tree752d8d93dcd86f3d41db4fbba7333e721fbaf808
parent7e59a08993649d19ca79bbd01d8faed48c7a88bd (diff)
Run tests during "make check" with run-test.shtrivia-54114
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54114 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--tests/twisted/Makefile.am42
1 files changed, 27 insertions, 15 deletions
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 764f074..0e3605a 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -34,28 +34,19 @@ TWISTED_TESTS = \
messages/room-config.py \
$(NULL)
-TESTS =
-
-TESTS_ENVIRONMENT = \
- PYTHONPATH=@abs_top_srcdir@/tests/twisted:@abs_top_builddir@/tests/twisted \
- IDLE_SSL_KEY=@abs_top_srcdir@/tests/twisted/tools/idletest.key \
- IDLE_SSL_CERT=@abs_top_srcdir@/tests/twisted/tools/idletest.cert
-
if WANT_TWISTED_TESTS
check-local: check-twisted
-check-twisted:
+check-twisted: $(BUILT_SOURCES)
$(MAKE) -C tools
rm -f tools/core
rm -f tools/idle-testing.log
failed=0; \
- sh $(srcdir)/tools/with-session-bus.sh \
- --config-file=tools/tmp-session-bus.conf \
- -- $(MAKE) check-TESTS \
- TESTS="$(TWISTED_TESTS)" \
- TESTS_ENVIRONMENT="$(TESTS_ENVIRONMENT) $(TEST_PYTHON) -u" || \
- failed=1; \
+ IDLE_TEST_UNINSTALLED=1 \
+ IDLE_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
+ IDLE_ABS_TOP_BUILDDIR=@abs_top_builddir@ \
+ sh run-test.sh "$(TWISTED_TESTS)" || failed=1; \
if test -e tools/core; then\
echo -e "\033[0;31;1mCore dump exists: tools/core\033[0m";\
exit 1;\
@@ -66,13 +57,34 @@ check-twisted:
endif
+BUILT_SOURCES = \
+ run-test.sh \
+ idle-twisted-tests.list \
+ $(NULL)
+
+run-test.sh: run-test.sh.in Makefile
+ $(AM_V_GEN)sed -e "s|[@]idletestsdir[@]|@idletestsdir@|g" \
+ -e "s|[@]PYTHON[@]|$(PYTHON)|g" \
+ -e "s|[@]TEST_PYTHON[@]|$(TEST_PYTHON)|g" \
+ $< > $@
+ @chmod +x $@
+
+idle-twisted-tests.list: Makefile
+ $(AM_V_GEN)echo $(TWISTED_TESTS) > $@
+
EXTRA_DIST = \
$(TWISTED_TESTS) \
servicetest.py \
idletest.py \
constants.py \
+ run-test.sh.in \
$(NULL)
-CLEANFILES = idle-[1-9]*.log *.pyc */*.pyc
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ idle-[1-9]*.log \
+ *.pyc \
+ */*.pyc \
+ $(NULL)
SUBDIRS = tools