aboutsummaryrefslogtreecommitdiffstats
path: root/skype/t/Makefile
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2009-02-18 00:31:13 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2009-02-18 00:31:13 +0100
commit25a7eb88368deebb9a595d983570a149e93881dd (patch)
treed228e61967f5d095bf4d1398b1265b3afa0e75dc /skype/t/Makefile
parent072c0fedea47e7c06b69fdfe7031df0cee43cc39 (diff)
Initial testcase.
Code is based on ulim's automated live tests.
Diffstat (limited to 'skype/t/Makefile')
-rw-r--r--skype/t/Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/skype/t/Makefile b/skype/t/Makefile
new file mode 100644
index 00000000..a65740c2
--- /dev/null
+++ b/skype/t/Makefile
@@ -0,0 +1,38 @@
+PORT=9876
+BITLBEE=/usr/sbin/bitlbee
+
+export TEST_SKYPE_ID=bitlbee-skype
+export TEST_SKYPE_PASSWORD=:9eQBgoh8
+
+testfiles := $(wildcard irssi/*.test)
+tests := $(patsubst %.test,%,$(testfiles))
+
+.PHONY: checkvars $(tests)
+
+default: $(tests)
+
+checkvars:
+ @for test in irssi/*.test; do NVAR="$$NVAR `irssi/livetest-irssi.sh $$test checkvars`";done;\
+ if echo $$NVAR|grep TEST &>/dev/null; then \
+ echo Needed variables: ; \
+ echo $$NVAR | tr ' ' '\n' | sort | uniq; \
+ exit 1; \
+ else \
+ echo "--- Environment OK ---";\
+ fi
+
+$(tests): % : %.test
+ @if ! NVARS=`irssi/livetest-irssi.sh $< checkvars`; then echo Need environment variables for $@: $$NVARS;\
+ echo Skipping...;exit 0;fi;\
+ echo "--- Running test $@ ---"; \
+ if ! ./livetest-bitlbee.sh $(BITLBEE) $(PORT) irssi/livetest-irssi.sh $< >$@.log; then \
+ echo Test failed, log: ;\
+ cat $@.log;\
+ exit 1;\
+ fi;\
+ echo "--- OK ---" ;\
+ sleep 1
+clean:
+ rm -r irssi/*.log bitlbeetest.pid dotirssi livetest
+
+