source: skype/t/Makefile @ fbd6c69

Last change on this file since fbd6c69 was 25a7eb8, checked in by Miklos Vajna <vmiklos@…>, at 2009-02-17T23:31:13Z

Initial testcase.

Code is based on ulim's automated live tests.

  • Property mode set to 100644
File size: 974 bytes
RevLine 
[25a7eb8]1PORT=9876
2BITLBEE=/usr/sbin/bitlbee
3
4export TEST_SKYPE_ID=bitlbee-skype
5export TEST_SKYPE_PASSWORD=:9eQBgoh8
6
7testfiles := $(wildcard irssi/*.test)
8tests := $(patsubst %.test,%,$(testfiles))
9
10.PHONY: checkvars $(tests)
11
12default: $(tests)
13
14checkvars:
15        @for test in irssi/*.test; do NVAR="$$NVAR `irssi/livetest-irssi.sh $$test checkvars`";done;\
16                if echo $$NVAR|grep TEST &>/dev/null; then \
17                        echo Needed variables: ; \
18                        echo $$NVAR | tr ' ' '\n' | sort | uniq; \
19                        exit 1; \
20                else \
21                        echo "--- Environment OK ---";\
22                fi
23
24$(tests): % : %.test
25        @if ! NVARS=`irssi/livetest-irssi.sh $< checkvars`; then echo Need environment variables for $@: $$NVARS;\
26                echo Skipping...;exit 0;fi;\
27        echo "--- Running test $@ ---"; \
28                if ! ./livetest-bitlbee.sh $(BITLBEE) $(PORT) irssi/livetest-irssi.sh $< >$@.log; then \
29                        echo Test failed, log: ;\
30                        cat $@.log;\
31                        exit 1;\
32                fi;\
33        echo "--- OK ---" ;\
34        sleep 1
35clean:
36        rm -r irssi/*.log bitlbeetest.pid dotirssi livetest
37
38
Note: See TracBrowser for help on using the repository browser.