Rev | Line | |
---|
[25a7eb8] | 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) |
---|
[3512d0b] | 13 | @echo "passed $$(echo $(testfiles)|wc -w) tests." |
---|
[25a7eb8] | 14 | |
---|
| 15 | checkvars: |
---|
| 16 | @for test in irssi/*.test; do NVAR="$$NVAR `irssi/livetest-irssi.sh $$test checkvars`";done;\ |
---|
| 17 | if echo $$NVAR|grep TEST &>/dev/null; then \ |
---|
| 18 | echo Needed variables: ; \ |
---|
| 19 | echo $$NVAR | tr ' ' '\n' | sort | uniq; \ |
---|
| 20 | exit 1; \ |
---|
| 21 | else \ |
---|
| 22 | echo "--- Environment OK ---";\ |
---|
| 23 | fi |
---|
| 24 | |
---|
| 25 | $(tests): % : %.test |
---|
| 26 | @if ! NVARS=`irssi/livetest-irssi.sh $< checkvars`; then echo Need environment variables for $@: $$NVARS;\ |
---|
| 27 | echo Skipping...;exit 0;fi;\ |
---|
| 28 | echo "--- Running test $@ ---"; \ |
---|
| 29 | if ! ./livetest-bitlbee.sh $(BITLBEE) $(PORT) irssi/livetest-irssi.sh $< >$@.log; then \ |
---|
| 30 | echo Test failed, log: ;\ |
---|
| 31 | cat $@.log;\ |
---|
| 32 | exit 1;\ |
---|
| 33 | fi;\ |
---|
| 34 | echo "--- OK ---" ;\ |
---|
| 35 | sleep 1 |
---|
| 36 | clean: |
---|
| 37 | rm -r irssi/*.log bitlbeetest.pid dotirssi livetest |
---|
| 38 | |
---|
| 39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.