summaryrefslogtreecommitdiff
path: root/tests/twisted/Makefile.am
blob: 966c70832da23c95e246bdc25a8f3c75ed83789b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
TWISTED_TESTS = \
		cm/protocol.py \
		connect/connect-close-ssl.py \
		connect/connect-success.py \
		connect/connect-success-ssl.py \
		connect/connect-reject-ssl.py \
		connect/connect-fail.py \
		connect/connect-fail-ssl.py \
		connect/disconnect-before-socket-connected.py \
		connect/disconnect-during-cert-verification.py \
		connect/ping.py \
		connect/server-quit-ignore.py \
		connect/server-quit-noclose.py \
		connect/socket-closed-after-handshake.py \
		connect/socket-closed-during-handshake.py \
		connect/invalid-nick.py \
		contacts.py \
		channels/join-muc-channel.py \
		channels/join-muc-channel-bouncer.py \
		channels/requests-create.py \
		channels/requests-muc.py \
		channels/muc-channel-topic.py \
		channels/muc-destroy.py \
		channels/room-list-channel.py \
		channels/room-list-multiple.py \
		messages/accept-invalid-nicks.py \
		messages/contactinfo-request.py \
		messages/invalid-utf8.py \
		messages/messages-iface.py \
		messages/message-order.py \
		messages/leading-space.py \
		messages/long-message-split.py \
		messages/room-contact-mixup.py \
		messages/room-config.py \
		$(NULL)

config.py: Makefile
	$(AM_V_GEN) { \
		echo "PACKAGE_STRING = \"$(PACKAGE_STRING)\""; \
	} > $@

if WANT_TWISTED_TESTS

check-local: check-twisted

CHECK_TWISTED_SLEEP=0

check-twisted: $(BUILT_SOURCES)
	$(MAKE) -C tools
	if test "x$(CHECK_TWISTED_SLEEP)" = x0; then \
		idle_test_sleep= ; \
	else \
		idle_test_sleep=--sleep=$(CHECK_TWISTED_SLEEP); \
	fi; \
	IDLE_TEST_UNINSTALLED=1 \
	  IDLE_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
	  IDLE_ABS_TOP_BUILDDIR=@abs_top_builddir@ \
	  IDLE_TEST_SLEEP=$$idle_test_sleep \
	  ./run-test.sh "$(TWISTED_TESTS)"

idle-twisted-tests.list: Makefile
	$(AM_V_GEN)echo $(TWISTED_TESTS) > $@

BUILT_SOURCES = \
	config.py \
	idle-twisted-tests.list \
	run-test.sh \
	$(NULL)

# We don't really use idletestsdir yet - we only support uninstalled testing
# so far - but I'm substituting it to keep the script more similar to Gabble's.
# ${pkglibexecdir}/tests is what GNOME's InstalledTests goal recommends.
run-test.sh: run-test.sh.in Makefile
	$(AM_V_GEN)sed \
			-e 's![@]idletestsdir[@]!${pkglibexecdir}/tests!' \
			-e 's![@]TEST_PYTHON[@]!$(TEST_PYTHON)!' \
			< $< > $@.tmp && \
		chmod +x $@.tmp && \
		mv $@.tmp $@

endif

EXTRA_DIST = \
	     $(TWISTED_TESTS) \
	     run-test.sh.in \
	     servicetest.py \
	     idletest.py \
	     constants.py \
	     $(NULL)

CLEANFILES = \
	$(BUILT_SOURCES) \
	idle-[1-9]*.log \
	*.pyc \
	*/*.pyc \
	$(NULL)

SUBDIRS = tools