From: shemminger Date: Thu, 23 Jun 2005 20:18:38 +0000 (+0000) Subject: Test suite update from Thomas Graf X-Git-Tag: ss-050808~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=150a5bc3a9b4765ec8e2f87cf2c37fc34cfd0e49;p=thirdparty%2Fiproute2.git Test suite update from Thomas Graf --- diff --git a/testsuite/Makefile b/testsuite/Makefile index 5661cea55..2a4e0ba9b 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -1,11 +1,18 @@ -TESTS := $(patsubst tests/%,%,$(wildcard tests/*)) +## -- Config -- +DEV := lo +PREFIX := sudo +## -- End Config -- + +TESTS := $(patsubst tests/%,%,$(wildcard tests/*.t)) IPVERS := $(filter-out iproute2/Makefile,$(wildcard iproute2/*)) +KENV := $(shell cat /proc/config.gz | gunzip | grep ^CONFIG) -DEV := eth0 +.PHONY: compile listtests alltests configure $(TESTS) -.PHONY: compile listtests alltests $(TESTS) +configure: + echo "Entering iproute2" && cd iproute2 && $(MAKE) configure && cd ..; -compile: +compile: configure echo "Entering iproute2" && cd iproute2 && $(MAKE) && cd ..; listtests: @@ -18,16 +25,21 @@ alltests: $(TESTS) clean: @rm -rf results/* +distclean: clean + echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..; + $(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 -n "Running $@ [$$o/`uname -r`]: "; \ + TC="$$i/tc/tc" IP="$$i/ip/ip" DEV="$(DEV)" IPVER="$@" SNAME="$$i" \ + ERRF="results/$@.$$o.err" $(KENV) $(PREFIX) tests/$@ > results/$@.$$o.out; \ + if [ "$$?" = "127" ]; then \ + echo "SKIPPED"; \ + elif [ -e "results/$@.$$o.err" ]; then \ echo "FAILED"; \ - fi \ + else \ + echo "PASS"; \ + fi; \ + dmesg > results/$@.$$o.dmesg; \ done diff --git a/testsuite/tests/std-cbq b/testsuite/tests/std-cbq deleted file mode 100644 index bff814b73..000000000 --- a/testsuite/tests/std-cbq +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -$TC qdisc del dev $DEV root >/dev/null 2>&1 -$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64 -$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded -$TC qdisc list dev $DEV -$TC qdisc del dev $DEV root -$TC qdisc list dev $DEV -$TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64 -$TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded -$TC qdisc del dev $DEV root