]> git.proxmox.com Git - mirror_iproute2.git/blob - testsuite/Makefile
Import patch iproute2.112
[mirror_iproute2.git] / testsuite / Makefile
1 TESTS := $(patsubst tests/%,%,$(wildcard tests/*))
2 IPVERS := $(filter-out iproute2/Makefile,$(wildcard iproute2/*))
3
4 DEV := eth0
5
6 .PHONY: compile listtests alltests $(TESTS)
7
8 compile:
9 echo "Entering iproute2" && cd iproute2 && $(MAKE) && cd ..;
10
11 listtests:
12 @for t in $(TESTS); do \
13 echo "$$t"; \
14 done
15
16 alltests: $(TESTS)
17
18 clean:
19 @rm -rf results/*
20
21 $(TESTS):
22 @for i in $(IPVERS); do \
23 echo -n "Running $@ with $$i on `uname -r`: "; \
24 logger "TESTMARK: $@"; \
25 o=`echo $$i | sed -e 's/iproute2\///'`; \
26 TC="$$i/tc/tc" IP="$$i/ip/ip" DEV="$(DEV)" sudo tests/$@ > results/$@.$$o.out 2> results/$@.$$o.err; \
27 dmesg > results/$@.$$o.dmesg; \
28 if [ -z "`cat results/$@.$$o.err`" ]; then \
29 echo "PASS"; \
30 else \
31 echo "FAILED"; \
32 fi \
33 done