From 043f6a39c1477bd5ac9336bd01b26e9db2840752 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Sun, 10 May 2015 13:46:53 +0200 Subject: [PATCH] Fix log messages of Travis tests in 12-rpl --- regression-tests/12-rpl/01-rpl-up-route.csc | 4 ++-- regression-tests/12-rpl/02-rpl-root-reboot.csc | 4 ++-- regression-tests/12-rpl/03-rpl-28-hours.csc | 4 ++-- regression-tests/12-rpl/04-rpl-large-network.csc | 4 ++-- regression-tests/12-rpl/05-rpl-up-and-down-routes.csc | 4 ++-- regression-tests/12-rpl/06-rpl-temporary-root-loss.csc | 4 ++-- regression-tests/12-rpl/08-rpl-dao-route-loss-0.csc | 4 ++-- regression-tests/12-rpl/08-rpl-dao-route-loss-1.csc | 4 ++-- regression-tests/12-rpl/08-rpl-dao-route-loss-2.csc | 4 ++-- regression-tests/12-rpl/08-rpl-dao-route-loss-3.csc | 4 ++-- regression-tests/12-rpl/08-rpl-dao-route-loss-4.csc | 4 ++-- regression-tests/12-rpl/08-rpl-dao-route-loss-5.csc | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/regression-tests/12-rpl/01-rpl-up-route.csc b/regression-tests/12-rpl/01-rpl-up-route.csc index 7c515b24b..bcefd4128 100644 --- a/regression-tests/12-rpl/01-rpl-up-route.csc +++ b/regression-tests/12-rpl/01-rpl-up-route.csc @@ -312,7 +312,7 @@ while(true) { } } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -323,7 +323,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/02-rpl-root-reboot.csc b/regression-tests/12-rpl/02-rpl-root-reboot.csc index eda75d60b..2ab456726 100644 --- a/regression-tests/12-rpl/02-rpl-root-reboot.csc +++ b/regression-tests/12-rpl/02-rpl-root-reboot.csc @@ -312,7 +312,7 @@ while(true) { } } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -323,7 +323,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/03-rpl-28-hours.csc b/regression-tests/12-rpl/03-rpl-28-hours.csc index d107f13b4..383b636fa 100644 --- a/regression-tests/12-rpl/03-rpl-28-hours.csc +++ b/regression-tests/12-rpl/03-rpl-28-hours.csc @@ -261,7 +261,7 @@ while(true) { } } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -272,7 +272,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/04-rpl-large-network.csc b/regression-tests/12-rpl/04-rpl-large-network.csc index 50b1cfad4..30944240a 100644 --- a/regression-tests/12-rpl/04-rpl-large-network.csc +++ b/regression-tests/12-rpl/04-rpl-large-network.csc @@ -7027,7 +7027,7 @@ while(true) { } } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -7038,7 +7038,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/05-rpl-up-and-down-routes.csc b/regression-tests/12-rpl/05-rpl-up-and-down-routes.csc index 7191e79ad..ba409e4fb 100644 --- a/regression-tests/12-rpl/05-rpl-up-and-down-routes.csc +++ b/regression-tests/12-rpl/05-rpl-up-and-down-routes.csc @@ -310,7 +310,7 @@ while(true) { } } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -321,7 +321,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc b/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc index f4c132c4d..297ef0646 100644 --- a/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc +++ b/regression-tests/12-rpl/06-rpl-temporary-root-loss.csc @@ -310,7 +310,7 @@ while(true) { } } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -321,7 +321,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/08-rpl-dao-route-loss-0.csc b/regression-tests/12-rpl/08-rpl-dao-route-loss-0.csc index 7f63864a2..66e890394 100644 --- a/regression-tests/12-rpl/08-rpl-dao-route-loss-0.csc +++ b/regression-tests/12-rpl/08-rpl-dao-route-loss-0.csc @@ -327,7 +327,7 @@ while(true) { node8.getInterfaces().getPosition().setCoordinates(58, 108, 0); } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -339,7 +339,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/08-rpl-dao-route-loss-1.csc b/regression-tests/12-rpl/08-rpl-dao-route-loss-1.csc index 9468dd53e..57b426ab2 100644 --- a/regression-tests/12-rpl/08-rpl-dao-route-loss-1.csc +++ b/regression-tests/12-rpl/08-rpl-dao-route-loss-1.csc @@ -327,7 +327,7 @@ while(true) { node8.getInterfaces().getPosition().setCoordinates(58, 108, 0); } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -339,7 +339,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/08-rpl-dao-route-loss-2.csc b/regression-tests/12-rpl/08-rpl-dao-route-loss-2.csc index 130eef941..2f42e92ea 100644 --- a/regression-tests/12-rpl/08-rpl-dao-route-loss-2.csc +++ b/regression-tests/12-rpl/08-rpl-dao-route-loss-2.csc @@ -327,7 +327,7 @@ while(true) { node8.getInterfaces().getPosition().setCoordinates(58, 108, 0); } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -339,7 +339,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/08-rpl-dao-route-loss-3.csc b/regression-tests/12-rpl/08-rpl-dao-route-loss-3.csc index d67d25f01..63fb1e042 100644 --- a/regression-tests/12-rpl/08-rpl-dao-route-loss-3.csc +++ b/regression-tests/12-rpl/08-rpl-dao-route-loss-3.csc @@ -327,7 +327,7 @@ while(true) { node8.getInterfaces().getPosition().setCoordinates(58, 108, 0); } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -339,7 +339,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/08-rpl-dao-route-loss-4.csc b/regression-tests/12-rpl/08-rpl-dao-route-loss-4.csc index bef4be8b8..8b33f560a 100644 --- a/regression-tests/12-rpl/08-rpl-dao-route-loss-4.csc +++ b/regression-tests/12-rpl/08-rpl-dao-route-loss-4.csc @@ -327,7 +327,7 @@ while(true) { node8.getInterfaces().getPosition().setCoordinates(58, 108, 0); } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -339,7 +339,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) { diff --git a/regression-tests/12-rpl/08-rpl-dao-route-loss-5.csc b/regression-tests/12-rpl/08-rpl-dao-route-loss-5.csc index c2623f780..56925381b 100644 --- a/regression-tests/12-rpl/08-rpl-dao-route-loss-5.csc +++ b/regression-tests/12-rpl/08-rpl-dao-route-loss-5.csc @@ -327,7 +327,7 @@ while(true) { node8.getInterfaces().getPosition().setCoordinates(58, 108, 0); } else if(msg.startsWith("Sending")) { hops = 0; - } else if(msg.startsWith("#L")) { + } else if(msg.startsWith("#L") && msg.endsWith("1; red")) { hops++; } else if(msg.startsWith("Data")) { // log.log("" + msg + "\n"); @@ -339,7 +339,7 @@ while(true) { // log.log("Num " + num + "\n"); if(lastMsg != -1) { if(num != lastMsg + 1) { - numMissed = num - lastMsg; + numMissed = num - lastMsg - 1; lostMsgs += numMissed; log.log("Missed messages " + numMissed + " before " + num + "\n"); for(i = 0; i < numMissed; i++) {