Merge pull request #1621 from simonduq/pr/fix-travis-output

Fix output of RPL tests
This commit is contained in:
Simon Duquennoy 2016-04-25 11:40:36 +02:00
commit 5b5f07ba52
14 changed files with 56 additions and 84 deletions

View File

@ -315,22 +315,20 @@ while(true) {
} else if(msg.startsWith("#L") && msg.endsWith("1; red")) {
hops++;
} else if(msg.startsWith("Data")) {
// log.log("" + msg + "\n"); 
data = msg.split(" ");
num = parseInt(data[14]);
packets = packets.substr(0, num) + "*";
log.log("" + hops + " " + packets + "\n");
// log.log("Num " + num + "\n");
if(lastMsg != -1) {
if(num != lastMsg + 1) {
numMissed = num - lastMsg - 1;
lostMsgs += numMissed;
lostMsgs += numMissed; 
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
for(i = 0; i < numMissed; i++) {
packets = packets.substr(0, lastMsg + i) + "_"; 
packets = packets.substr(0, lastMsg + i + 1) + "_"; 
}
} 
}
packets = packets.substr(0, num) + "*";
log.log("" + hops + " " + packets + "\n");
lastMsg = num;
}
}</script>

View File

@ -315,22 +315,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -264,22 +264,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -7030,22 +7030,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -313,22 +313,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -318,23 +318,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
lastMissed = num;&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -226,23 +226,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
lastMsgHops = hops;&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>

View File

@ -356,12 +356,8 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(newSink) {&#xD;
newDagOk++;&#xD;
newSink = 0;&#xD;
@ -369,13 +365,15 @@ while(true) {&#xD;
if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed;&#xD;
lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD;
packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD;
} &#xD;
}&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD;
}&#xD;
}</script>