From f6b8fdc2a8e1afdb46d6e2fd1d76b98064c4f3dd Mon Sep 17 00:00:00 2001 From: fros4943 Date: Wed, 25 Feb 2009 12:14:19 +0000 Subject: [PATCH] added very simple sky ipv6 test: exercises the examples/udp-sender-ipv6 and examples/udp-receiver-ipv6 code --- tools/cooja/contiki_tests/sky_ipv6_udp.csc | 100 ++++++++++++++++++++ tools/cooja/contiki_tests/sky_ipv6_udp.info | 1 + tools/cooja/contiki_tests/sky_ipv6_udp.js | 21 ++++ 3 files changed, 122 insertions(+) create mode 100644 tools/cooja/contiki_tests/sky_ipv6_udp.csc create mode 100644 tools/cooja/contiki_tests/sky_ipv6_udp.info create mode 100644 tools/cooja/contiki_tests/sky_ipv6_udp.js diff --git a/tools/cooja/contiki_tests/sky_ipv6_udp.csc b/tools/cooja/contiki_tests/sky_ipv6_udp.csc new file mode 100644 index 000000000..b24b69993 --- /dev/null +++ b/tools/cooja/contiki_tests/sky_ipv6_udp.csc @@ -0,0 +1,100 @@ + + + + My simulation + 0 + 1 + 123457 + 1000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #1 + ../../../examples/udp-sender-ipv6/example-udp-sender.c + make example-udp-sender.sky TARGET=sky DEFINES=WITH_UIP6,WITH_NULLMAC,UDP_ADDR_A=0xfe80,UDP_ADDR_B=0,UDP_ADDR_C=0,UDP_ADDR_D=0,UDP_ADDR_E=0x0212,UDP_ADDR_F=0x7502,UDP_ADDR_G=0x02,UDP_ADDR_H=0x202 + + + se.sics.cooja.mspmote.SkyMoteType + sky2 + Sky Mote Type #2 + ../../../examples/udp-receiver-ipv6/example-udp-receiver.c + make example-udp-receiver.sky TARGET=sky DEFINES=WITH_UIP6,WITH_NULLMAC,UDP_ADDR_A=0xfe80,UDP_ADDR_B=0,UDP_ADDR_C=0,UDP_ADDR_D=0,UDP_ADDR_E=0x0212,UDP_ADDR_F=0x7501,UDP_ADDR_G=0x01,UDP_ADDR_H=0x101 + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 65.934608127183 + 63.70462190529231 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + + + se.sics.cooja.mspmote.SkyMote + sky2 + + se.sics.cooja.interfaces.Position + 67.66105781539623 + 63.13924301161143 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + + + + se.sics.cooja.plugins.SimControl + 248 + 1 + 200 + 0 + 0 + false + + + se.sics.cooja.plugins.LogListener + + + 256 + + 1067 + 2 + 300 + 0 + 523 + false + + + se.sics.cooja.plugins.RadioLogger + 1062 + 4 + 309 + 6 + 207 + false + + + se.sics.cooja.plugins.VisUDGM + 300 + 3 + 108 + 766 + 11 + false + + + diff --git a/tools/cooja/contiki_tests/sky_ipv6_udp.info b/tools/cooja/contiki_tests/sky_ipv6_udp.info new file mode 100644 index 000000000..c05fae2ae --- /dev/null +++ b/tools/cooja/contiki_tests/sky_ipv6_udp.info @@ -0,0 +1 @@ +Two Sky nodes: examples/udp-receiver-ipv6/example-udp-receiver.c and examples/udp-sender-ipv6/example-udp-sender.c. Test success after 5 replies diff --git a/tools/cooja/contiki_tests/sky_ipv6_udp.js b/tools/cooja/contiki_tests/sky_ipv6_udp.js new file mode 100644 index 000000000..b32fa8c0c --- /dev/null +++ b/tools/cooja/contiki_tests/sky_ipv6_udp.js @@ -0,0 +1,21 @@ +TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */ + +WAIT_UNTIL(msg.contains("Created connection")); +YIELD_THEN_WAIT_UNTIL(msg.contains("Created connection")); + +log.log("Both nodes booted\n"); + +count = 0; +while (count++ < 5) { + /* Message from sender process to receiver process */ + YIELD_THEN_WAIT_UNTIL(msg.contains("Sender sending")); + YIELD_THEN_WAIT_UNTIL(msg.contains("Receiver received")); + log.log(count + ": Sender -> Receiver OK\n"); + + /* Message from receiver process to sender process */ + YIELD_THEN_WAIT_UNTIL(msg.contains("Receiver sending")); + YIELD_THEN_WAIT_UNTIL(msg.contains("Sender received")); + log.log(count + ": Receiver -> Sender OK\n"); +} + +log.testOK(); /* Report test success and quit */