Thomas Vachuska

Changing stc scenarios to be compatible with multiple links in the ATT MPLS test topology.

Change-Id: I9ee8fd9a3279a0d59f837569a7ada0eb77fd1d41
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 6 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7 . $ONOS_ROOT/tools/build/envDefaults 7 . $ONOS_ROOT/tools/build/envDefaults
8 8
9 +export MAX_WAIT=45
10 +
9 cmd="$1" && shift 11 cmd="$1" && shift
10 log="screenlog.0" 12 log="screenlog.0"
11 remote="$ONOS_USER@$OCN" 13 remote="$ONOS_USER@$OCN"
...@@ -25,8 +27,9 @@ sendAndExpect) ...@@ -25,8 +27,9 @@ sendAndExpect)
25 27
26 wait) 28 wait)
27 ssh $remote " 29 ssh $remote "
28 - sleep 1 && while test ! -f $log; do sleep 1; done 30 + let count=0
29 - while ! (tail -n1 $log | egrep -q '^mininet>'); do sleep 1; done 31 + sleep 1 && while test ! -f $log; do if test \$count -ge $MAX_WAIT; then exit 1; fi; sleep 1; let count=count+1; done
32 + while ! (tail -n1 $log | egrep -q '^mininet>'); do if [ \$count -ge $MAX_WAIT ]; then exit 1; fi; sleep 1; done
30 sleep ${1-:1} 33 sleep ${1-:1}
31 " 34 "
32 ;; 35 ;;
...@@ -36,7 +39,8 @@ expect) ...@@ -36,7 +39,8 @@ expect)
36 ssh $remote " 39 ssh $remote "
37 sleep 1 40 sleep 1
38 if [ ! -f $log ]; then exit 1; fi; 41 if [ ! -f $log ]; then exit 1; fi;
39 - while ! (tail -n1 $log | egrep -q '^mininet>'); do sleep 1; done 42 + let count=0
43 + while ! (tail -n1 $log | egrep -q '^mininet>'); do if test \$count -ge $MAX_WAIT; then exit 1; fi; sleep 1; let count=count+1; done
40 tac $log | awk '{ print \$0; } /^mininet>/ { if (on) { exit 0; } on=1; }' | tac > $aux 44 tac $log | awk '{ print \$0; } /^mininet>/ { if (on) { exit 0; } on=1; }' | tac > $aux
41 cat $aux 45 cat $aux
42 set -x 46 set -x
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 exec="onos-mininet sendAndExpect py net.pingAll(1) --expect Results: .* dropped"/> 20 exec="onos-mininet sendAndExpect py net.pingAll(1) --expect Results: .* dropped"/>
21 21
22 <step name="Check-Summary-For-Hosts" requires="~Ping-All-And-Verify" 22 <step name="Check-Summary-For-Hosts" requires="~Ping-All-And-Verify"
23 - exec="onos-check-summary ${OC1} [0-9]* 25 112 25"/> 23 + exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/>
24 24
25 <step name="Config-Topo" requires="Check-Summary-For-Hosts" 25 <step name="Config-Topo" requires="Check-Summary-For-Hosts"
26 exec="onos-topo-cfg ${OC1} ${ONOS_ROOT}/tools/test/topos/attmpls.json"/> 26 exec="onos-topo-cfg ${OC1} ${ONOS_ROOT}/tools/test/topos/attmpls.json"/>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
37 exec="onos-mininet wait 15"/> 37 exec="onos-mininet wait 15"/>
38 38
39 <step name="Check-Summary" requires="Wait-For-Mininet" 39 <step name="Check-Summary" requires="Wait-For-Mininet"
40 - exec="onos-check-summary ${OC1} [0-9]* 25 112 0"/> 40 + exec="onos-check-summary ${OC1} [0-9]* 25 140 0"/>
41 41
42 <step name="Balance-Masters" requires="Check-Summary" 42 <step name="Balance-Masters" requires="Check-Summary"
43 exec="onos ${OC1} balance-masters"/> 43 exec="onos ${OC1} balance-masters"/>
......