6 TESTS
:= $(patsubst tests
/%,%,$(wildcard tests
/*.t
))
7 IPVERS
:= $(filter-out iproute2
/Makefile
,$(wildcard iproute2
/*))
8 KENV
:= $(shell cat
/proc
/config.gz | gunzip | grep ^CONFIG
)
10 .PHONY
: compile listtests alltests configure
$(TESTS
)
13 echo
"Entering iproute2" && cd iproute2
&& $(MAKE
) configure
&& cd ..
;
16 echo
"Entering iproute2" && cd iproute2
&& $(MAKE
) && cd ..
;
19 @for t in
$(TESTS
); do \
29 echo
"Entering iproute2" && cd iproute2
&& $(MAKE
) distclean && cd ..
;
32 @for i in
$(IPVERS
); do \
33 o
=`echo $$i | sed -e 's/iproute2\///'`; \
34 echo
-n
"Running $@ [$$o/`uname -r`]: "; \
35 TC
="$$i/tc/tc" IP
="$$i/ip/ip" DEV
="$(DEV)" IPVER
="$@" SNAME
="$$i" \
36 ERRF
="results/$@.$$o.err" $(KENV
) $(PREFIX
) tests
/$@
> results
/$@.
$$o.out
; \
37 if
[ "$$?" = "127" ]; then \
39 elif
[ -e
"results/$@.$$o.err" ]; then \
44 dmesg
> results
/$@.
$$o.dmesg
; \