blob: 5661cea554b3793d2131530f799e65ab0fd564cb [file] [log] [blame]
TESTS := $(patsubst tests/%,%,$(wildcard tests/*))
IPVERS := $(filter-out iproute2/Makefile,$(wildcard iproute2/*))
DEV := eth0
.PHONY: compile listtests alltests $(TESTS)
compile:
echo "Entering iproute2" && cd iproute2 && $(MAKE) && cd ..;
listtests:
@for t in $(TESTS); do \
echo "$$t"; \
done
alltests: $(TESTS)
clean:
@rm -rf results/*
$(TESTS):
@for i in $(IPVERS); do \
echo -n "Running $@ with $$i on `uname -r`: "; \
logger "TESTMARK: $@"; \
o=`echo $$i | sed -e 's/iproute2\///'`; \
TC="$$i/tc/tc" IP="$$i/ip/ip" DEV="$(DEV)" sudo tests/$@ > results/$@.$$o.out 2> results/$@.$$o.err; \
dmesg > results/$@.$$o.dmesg; \
if [ -z "`cat results/$@.$$o.err`" ]; then \
echo "PASS"; \
else \
echo "FAILED"; \
fi \
done