From 411d92a2975b2a2305a434f425308f8914f9c23b Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 17 Feb 2009 12:58:13 +0000 Subject: [PATCH] minor fix: only reporting test ok if test did not already fail --- tools/cooja/contiki_tests/rime_runicast.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/cooja/contiki_tests/rime_runicast.js b/tools/cooja/contiki_tests/rime_runicast.js index 3621d46d9..d8a8a9fd9 100644 --- a/tools/cooja/contiki_tests/rime_runicast.js +++ b/tools/cooja/contiki_tests/rime_runicast.js @@ -34,18 +34,20 @@ if (nr_recv < nr_sent-3) { log.testFailed(); } -if (nr_recv > nr_sent+3) { +else if (nr_recv > nr_sent+3) { log.log("Error: Received >> Sent!\n"); log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n"); log.testFailed(); } /* Make sure some packets timed out (all from node 4) */ -if (nr_timedout < 2) { +else if (nr_timedout < 2) { log.log("Error: Too few packets timed out!\n"); log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n"); log.testFailed(); } -log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n"); -log.testOK(); +else { + log.log("recv=" + nr_recv + ", sent=" + nr_sent + ", timedout=" + nr_timedout + "\n"); + log.testOK(); +}