diff --git a/tools/cooja/contiki_tests/ip_sky_webserver_wget.csc b/tools/cooja/contiki_tests/ip_sky_webserver_wget.csc index f93823f79..661d6f957 100644 --- a/tools/cooja/contiki_tests/ip_sky_webserver_wget.csc +++ b/tools/cooja/contiki_tests/ip_sky_webserver_wget.csc @@ -18,15 +18,15 @@ sky1 Sky Mote Type #1 ../../../examples/sky-shell-webserver/sky-shell-webserver.c - make sky-shell-webserver.sky TARGET=sky + bash -c 'make clean TARGET=sky && make sky-shell-webserver.sky TARGET=sky DEFINES=WITH_NULLMAC && make clean TARGET=sky' se.sics.cooja.mspmote.SkyMote sky1 se.sics.cooja.interfaces.Position - 67.00582793711605 - 61.11208446062922 + 16.08449565170202 + 26.59851562245121 0.0 @@ -53,8 +53,8 @@ sky1 se.sics.cooja.interfaces.Position - 17.479600645822952 - 16.52364251581611 + 70.00470747576063 + 60.92771287468932 0.0 @@ -86,52 +86,39 @@ 0 false - - se.sics.cooja.plugins.LogListener - - - 256 - - 998 - 4 - 166 - 0 - 704 - false - se.sics.cooja.radiomediums.UDGM$VisUDGM - 300 - 3 - 169 - 693 + 435 + 4 + 195 + 255 6 false - - se.sics.cooja.plugins.MoteInterfaceViewer - 2 - - Serial port - - 758 - 5 - 245 - 2 - 202 - false - se.sics.cooja.plugins.MoteInterfaceViewer 3 Serial port - 683 + 684 + 3 + 324 + 10 + 547 + false + + + se.sics.cooja.plugins.MoteInterfaceViewer + 0 + + Serial port + + 682 2 - 244 - 312 - 452 + 334 + 10 + 207 false diff --git a/tools/cooja/contiki_tests/ip_sky_webserver_wget.info b/tools/cooja/contiki_tests/ip_sky_webserver_wget.info index 8911bf1d7..66e37e060 100644 --- a/tools/cooja/contiki_tests/ip_sky_webserver_wget.info +++ b/tools/cooja/contiki_tests/ip_sky_webserver_wget.info @@ -1 +1 @@ -Four Sky nodes running both the shell and a CFS webserver. Test uses shell commands write and wget to generate and transfer files. +Four Sky nodes running both the shell and a CFS webserver. Test uses shell commands echo, write, append and wget to generate and transfer files over a multi-hop link. Test uses NULLMAC- diff --git a/tools/cooja/contiki_tests/ip_sky_webserver_wget.js b/tools/cooja/contiki_tests/ip_sky_webserver_wget.js index 98c2d1d94..911272fb2 100644 --- a/tools/cooja/contiki_tests/ip_sky_webserver_wget.js +++ b/tools/cooja/contiki_tests/ip_sky_webserver_wget.js @@ -2,31 +2,45 @@ TIMEOUT(90000, log.log("last message: " + msg + "\n")); mote1 = null; mote4 = null; +nr_boot = 0; -/* Wait until both node 1 and 4 have booted */ +/* Wait until all nodes have booted */ while (true) { if (msg.contains('Starting')) { + nr_boot++; if (id == 1) mote1 = mote; if (id == 4) mote4 = mote; } - if (mote1 != null && mote4 != null) break; + if (nr_boot == 4) break; YIELD(); } -log.log("Mote 1 and mote 4 booted\n"); +log.log("All motes booted\n"); /* Wait one second */ GENERATE_MSG(1000, "continue"); WAIT_UNTIL(msg.equals("continue")); /* Create file on node 1 */ -log.log("Creating data on node 1\n"); -write(mote1, "echo data generated at node 1 | write node1file.txt\n"); +log.log("Node 1 creating data\n"); +write(mote1, "echo FROM1 | write node1file.txt\n"); -/* Fetch file to node 2 */ -log.log("Fetching data to node 4\n"); -write(mote4, "wget 172.16.1.0/node1file.txt | write node2file.txt\n"); +/* Download node1file.txt to node 4 */ +log.log("Node 4 downloading from node 1\n"); +write(mote4, "wget 172.16.1.0/node1file.txt | write node4file.txt\n"); +WAIT_UNTIL(id == 4 && msg.contains("FROM1")); -WAIT_UNTIL(id == 4 && msg.contains("data generated at node 1")); -log.log("Node 4 received data!\n"); +/* Wait one second */ +GENERATE_MSG(1000, "continue"); +WAIT_UNTIL(msg.equals("continue")); + +/* Extend data */ +log.log("Node 4 appending data\n"); +write(mote4, "echo FROM4 | append node4file.txt\n"); + +/* Download node2file.txt at node 1 */ +log.log("Node 1 downloading from node 4\n"); +write(mote1, "wget 172.16.4.0/node4file.txt\n"); + +WAIT_UNTIL(id == 1 && msg.contains("FROM4")); log.testOK();