summaryrefslogtreecommitdiff
path: root/Makefile
blob: 21f941a76dd288658f13b54215c17fbffeb9247b (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
BINDINGS?=java glib python perl qt4

all: testall analyzeall


analyzeall:
	( for i in $(BINDINGS) ; do \
		  echo "Test results for $${i}" ;\
		  echo -n "   Tested against: " ;\
		  echo `ls *$${i}*.*.log | sed 's/\..*$$//;s/-/\n/g' | sort -u` ;\
		  echo -n "   Passes: " ;\
		  echo -ne "\033[32m";\
		  cat $${i}*.client.log | grep -c pass ;\
		  echo -ne "\033[39m";\
		  echo -n "   Fails: " ;\
		  if grep fail $${i}*.client.log &>/dev/null; then \
			  echo -ne "\033[31m";\
		  else \
			  echo -ne "\033[32m";\
		  fi; \
		  cat $${i}*.client.log | grep -c fail ;\
		  echo -ne "\033[39m";\
		  echo -ne "\033[31m";\
		  for j in $${i}*.client.log; do \
		  	 for k in `grep fail $$j | cut -d' ' -f 3`; do \
				echo "     " `grep "fail $$k" < $$j | cut -d' ' -f1`: `grep "^report $${k}:" < $$j | cut -d: -f2`; \
			 done ;\
		  done ;\
		  echo -ne "\033[39m";\
		  echo -n "   $${i} failed to test: " ;\
		  if grep fail $${i}*.client.log &>/dev/null; then \
			  echo -ne "\033[33m";\
		  else \
			  echo -ne "\033[32m";\
		  fi; \
		  cat *$${i}.server.log | grep -c untested$$ ;\
		  echo -ne "\033[33m";\
		  cat *$${i}.server.log | grep untested$$ | cut -d' ' -f1 | sed 's/^/      /' | sort -u;\
		  echo -ne "\033[39m";\
	done )
	

testall:
	( for i in $(BINDINGS) ; do \
		 for j in $(BINDINGS) ; do \
			make -s SERV=$$i CLI=$$j check ;\
		 done \
	  done)

clean:
	-rm -- *log
	-rm address
	-rm pid
	-rm tmp-session-bus

check:
	( dbus-daemon --config-file=tmp-session.conf --print-pid --print-address=5 --fork >pid 5>address ; \
	  export DBUS_SESSION_BUS_ADDRESS=$$(cat address) ;\
	  make -sC $(SERV) cross-test-server > $(SERV)-$(CLI).server.log &\
	  make -sC $(CLI) cross-test-client > $(SERV)-$(CLI).client.log ;\
	  kill $$(cat pid) )