7 TESTS
:= $(patsubst tests
/%,%,$(wildcard tests
/*.t
))
8 IPVERS
:= $(filter-out iproute2
/Makefile
,$(wildcard iproute2
/*))
10 ifneq (,$(wildcard /proc
/config.gz
))
11 KENV
:= $(shell cat
/proc
/config.gz | gunzip | grep ^CONFIG
)
14 .PHONY
: compile listtests alltests configure
$(TESTS
)
17 echo
"Entering iproute2" && cd iproute2
&& $(MAKE
) configure
&& cd ..
;
20 echo
"Entering iproute2" && cd iproute2
&& $(MAKE
) && cd ..
;
23 @for t in
$(TESTS
); do \
30 @
rm -rf
$(RESULTS_DIR
)
33 echo
"Entering iproute2" && cd iproute2
&& $(MAKE
) distclean && cd ..
;
36 @mkdir
-p
$(RESULTS_DIR
)
37 @for i in
$(IPVERS
); do \
38 o
=`echo $$i | sed -e 's/iproute2\///'`; \
39 echo
-n
"Running $@ [$$o/`uname -r`]: "; \
40 TC
="$$i/tc/tc" IP
="$$i/ip/ip" DEV
="$(DEV)" IPVER
="$@" SNAME
="$$i" \
41 ERRF
="$(RESULTS_DIR)/$@.$$o.err" $(KENV
) $(PREFIX
) tests
/$@
> $(RESULTS_DIR
)/$@.
$$o.out
; \
42 if
[ "$$?" = "127" ]; then \
44 elif
[ -e
"$(RESULTS_DIR)/$@.$$o.err" ]; then \
49 dmesg
> $(RESULTS_DIR
)/$@.
$$o.dmesg
; \