diff --git a/tools/cooja/contiki_tests/rime_abc.csc b/tools/cooja/contiki_tests/rime_abc.csc
index 40a517a34..8ac1536b3 100644
--- a/tools/cooja/contiki_tests/rime_abc.csc
+++ b/tools/cooja/contiki_tests/rime_abc.csc
@@ -5,13 +5,12 @@
0
1
123456
- 1
5000
se.sics.cooja.radiomediums.UDGM
50.0
100.0
- 1.0
+ 0.95
1.0
@@ -53,7 +52,7 @@
se.sics.cooja.plugins.SimControl
313
- 2
+ 1
199
30
30
@@ -62,7 +61,7 @@
se.sics.cooja.radiomediums.UDGM$VisUDGM
300
- 3
+ 2
122
367
23
@@ -75,7 +74,7 @@
256
573
- 1
+ 3
242
23
235
diff --git a/tools/cooja/contiki_tests/rime_abc.info b/tools/cooja/contiki_tests/rime_abc.info
index 2e103276c..c247336d2 100644
--- a/tools/cooja/contiki_tests/rime_abc.info
+++ b/tools/cooja/contiki_tests/rime_abc.info
@@ -1 +1 @@
-Rime anonymous broadcast (test-abc.c). Two Sky nodes.
+Two Sky nodes running Rime anonymous broadcast (examples/rime/example-abc.c). Test finishes when both nodes have received more than 30 messages each.
diff --git a/tools/cooja/contiki_tests/rime_abc.js b/tools/cooja/contiki_tests/rime_abc.js
index 8e7d7405b..cddc84d25 100644
--- a/tools/cooja/contiki_tests/rime_abc.js
+++ b/tools/cooja/contiki_tests/rime_abc.js
@@ -3,9 +3,14 @@ if (!msg.contains('received')) {
return;
}
-/* Remember receiver */
-global.put("recv_" + id, "ok");
-log.log(id + " received a message\n");
+/* Count received packets */
+result = global.get("recv_" + id);
+if (result == null) {
+ result = 0;
+}
+result++;
+global.put("recv_" + id, result);
+log.log(id + " received " + result + " messages\n");
/* Did all nodes (1 and 2) receive a message? */
for (i = 1; i <= 2; i++) {
@@ -13,7 +18,11 @@ for (i = 1; i <= 2; i++) {
if (result == null) {
return;
}
+ if (result < 30) {
+ return;
+ }
}
-log.log("TEST OK\n"); /* Report test success */
-mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/
+log.log("Node 1 received " + global.get("recv_1") + " messages\n");
+log.log("Node 2 received " + global.get("recv_2") + " messages\n");
+log.testOK(); /* Report test success */