Last change
on this file since 50d453d 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
|
Line | |
---|
1 | PORT=9876 |
---|
2 | BITLBEE=/usr/sbin/bitlbee |
---|
3 | |
---|
4 | export TEST_SKYPE_ID=bitlbee-skype |
---|
5 | export TEST_SKYPE_PASSWORD=:9eQBgoh8 |
---|
6 | |
---|
7 | testfiles := $(wildcard irssi/*.test) |
---|
8 | tests := $(patsubst %.test,%,$(testfiles)) |
---|
9 | |
---|
10 | .PHONY: checkvars $(tests) |
---|
11 | |
---|
12 | default: $(tests) |
---|
13 | |
---|
14 | checkvars: |
---|
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 |
---|
35 | clean: |
---|
36 | rm -r irssi/*.log bitlbeetest.pid dotirssi livetest |
---|
37 | |
---|
38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.