From 7c1c901028cb3f496387a2054f507482376f13d9 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 10 Nov 2017 21:32:46 +0100 Subject: [PATCH] Added CI test: border router on Sky motes --- .../01-border-router-cooja.sh | 2 +- .../02-border-router-cooja-tsch.sh | 2 +- .../03-border-router-sky.csc | 236 ++++++++++++++++++ .../03-border-router-sky.sh | 9 + .../test-border-router.sh | 5 +- 5 files changed, 251 insertions(+), 3 deletions(-) create mode 100644 tests/17-rpl-border-router/03-border-router-sky.csc create mode 100755 tests/17-rpl-border-router/03-border-router-sky.sh diff --git a/tests/17-rpl-border-router/01-border-router-cooja.sh b/tests/17-rpl-border-router/01-border-router-cooja.sh index f19b386e9..6a781583d 100755 --- a/tests/17-rpl-border-router/01-border-router-cooja.sh +++ b/tests/17-rpl-border-router/01-border-router-cooja.sh @@ -6,4 +6,4 @@ CONTIKI=$1 # Simulation file BASENAME=01-border-router-cooja -bash test-border-router.sh $CONTIKI $BASENAME +bash test-border-router.sh $CONTIKI $BASENAME fd00::204:4:4:4 diff --git a/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh b/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh index 02ec6e294..b91a8d5c7 100755 --- a/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh +++ b/tests/17-rpl-border-router/02-border-router-cooja-tsch.sh @@ -6,4 +6,4 @@ CONTIKI=$1 # Simulation file BASENAME=02-border-router-cooja-tsch -bash border-router.sh $CONTIKI $BASENAME +bash test-border-router.sh $CONTIKI $BASENAME fd00::204:4:4:4 diff --git a/tests/17-rpl-border-router/03-border-router-sky.csc b/tests/17-rpl-border-router/03-border-router-sky.csc new file mode 100644 index 000000000..d707dde17 --- /dev/null +++ b/tests/17-rpl-border-router/03-border-router-sky.csc @@ -0,0 +1,236 @@ + + + [APPS_DIR]/mrm + [APPS_DIR]/mspsim + [APPS_DIR]/avrora + [APPS_DIR]/serial_socket + [APPS_DIR]/collect-view + [APPS_DIR]/powertracker + + My simulation + 1.0 + 123456 + 1000000 + + org.contikios.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + org.contikios.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #sky1 + [CONTIKI_DIR]/examples/rpl-border-router/border-router.c + make clean TARGET=sky +make border-router.sky TARGET=sky + [CONTIKI_DIR]/examples/rpl-border-router/border-router.sky + org.contikios.cooja.interfaces.Position + org.contikios.cooja.interfaces.RimeAddress + org.contikios.cooja.interfaces.IPAddress + org.contikios.cooja.interfaces.Mote2MoteRelations + org.contikios.cooja.interfaces.MoteAttributes + org.contikios.cooja.mspmote.interfaces.MspClock + org.contikios.cooja.mspmote.interfaces.MspMoteID + org.contikios.cooja.mspmote.interfaces.SkyButton + org.contikios.cooja.mspmote.interfaces.SkyFlash + org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem + org.contikios.cooja.mspmote.interfaces.Msp802154Radio + org.contikios.cooja.mspmote.interfaces.MspSerial + org.contikios.cooja.mspmote.interfaces.SkyLED + org.contikios.cooja.mspmote.interfaces.MspDebugOutput + org.contikios.cooja.mspmote.interfaces.SkyTemperature + + + org.contikios.cooja.mspmote.SkyMoteType + sky2 + Sky Mote Type #sky2 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make clean TARGET=sky +make hello-world.sky TARGET=sky + [CONTIKI_DIR]/examples/hello-world/hello-world.sky + org.contikios.cooja.interfaces.Position + org.contikios.cooja.interfaces.RimeAddress + org.contikios.cooja.interfaces.IPAddress + org.contikios.cooja.interfaces.Mote2MoteRelations + org.contikios.cooja.interfaces.MoteAttributes + org.contikios.cooja.mspmote.interfaces.MspClock + org.contikios.cooja.mspmote.interfaces.MspMoteID + org.contikios.cooja.mspmote.interfaces.SkyButton + org.contikios.cooja.mspmote.interfaces.SkyFlash + org.contikios.cooja.mspmote.interfaces.SkyCoffeeFilesystem + org.contikios.cooja.mspmote.interfaces.Msp802154Radio + org.contikios.cooja.mspmote.interfaces.MspSerial + org.contikios.cooja.mspmote.interfaces.SkyLED + org.contikios.cooja.mspmote.interfaces.MspDebugOutput + org.contikios.cooja.mspmote.interfaces.SkyTemperature + + + + + org.contikios.cooja.interfaces.Position + -24.750327773354453 + 17.688901393447438 + 0.0 + + + org.contikios.cooja.mspmote.interfaces.MspClock + 1.0 + + + org.contikios.cooja.mspmote.interfaces.MspMoteID + 1 + + sky1 + + + + + org.contikios.cooja.interfaces.Position + 1.091493067677618 + 40.943504236660225 + 0.0 + + + org.contikios.cooja.mspmote.interfaces.MspClock + 1.0 + + + org.contikios.cooja.mspmote.interfaces.MspMoteID + 2 + + sky2 + + + + + org.contikios.cooja.interfaces.Position + 22.647678967805337 + 61.6365018442491 + 0.0 + + + org.contikios.cooja.mspmote.interfaces.MspClock + 1.0 + + + org.contikios.cooja.mspmote.interfaces.MspMoteID + 3 + + sky2 + + + + + org.contikios.cooja.interfaces.Position + 44.02005813888037 + 93.02398317771755 + 0.0 + + + org.contikios.cooja.mspmote.interfaces.MspClock + 1.0 + + + org.contikios.cooja.mspmote.interfaces.MspMoteID + 4 + + sky2 + + + + org.contikios.cooja.plugins.SimControl + 280 + 1 + 160 + 400 + 0 + + + org.contikios.cooja.plugins.Visualizer + + true + org.contikios.cooja.plugins.skins.IDVisualizerSkin + org.contikios.cooja.plugins.skins.UDGMVisualizerSkin + 2.3610941331949244 0.0 0.0 2.3610941331949244 119.38219749746548 -4.52452305190821 + + 400 + 3 + 400 + 1 + 1 + + + org.contikios.cooja.plugins.LogListener + + + + + + 1404 + 6 + 240 + 400 + 160 + + + org.contikios.cooja.plugins.TimeLine + + 0 + 1 + 2 + 3 + + + + 500.0 + + 1804 + 5 + 166 + 0 + 742 + + + org.contikios.cooja.plugins.Notes + + Enter notes here + true + + 1124 + 4 + 160 + 680 + 0 + + + org.contikios.cooja.serialsocket.SerialSocketServer + 0 + + 60001 + true + + 362 + 2 + 116 + 30 + 403 + + + org.contikios.cooja.plugins.ScriptRunner + + + true + + 600 + 0 + 700 + 850 + 13 + + + diff --git a/tests/17-rpl-border-router/03-border-router-sky.sh b/tests/17-rpl-border-router/03-border-router-sky.sh new file mode 100755 index 000000000..798e0242b --- /dev/null +++ b/tests/17-rpl-border-router/03-border-router-sky.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Contiki directory +CONTIKI=$1 + +# Simulation file +BASENAME=03-border-router-sky + +bash test-border-router.sh $CONTIKI $BASENAME fd00::0212:7404:0004:0404 diff --git a/tests/17-rpl-border-router/test-border-router.sh b/tests/17-rpl-border-router/test-border-router.sh index c99c01117..ab1ef55bd 100755 --- a/tests/17-rpl-border-router/test-border-router.sh +++ b/tests/17-rpl-border-router/test-border-router.sh @@ -6,6 +6,9 @@ CONTIKI=$1 # Simulation file BASENAME=$2 +# Destination IPv6 +IPADDR=$3 + # Start simulation echo "Starting Cooja simulation $BASENAME.csc" java -Xshare:on -jar $CONTIKI/tools/cooja/dist/cooja.jar -nogui=$BASENAME.csc -contiki=$CONTIKI > /dev/null & @@ -22,7 +25,7 @@ sleep 5 # Do ping echo "Pinging" -ping6 fd00::204:4:4:4 -c 5 | tee $BASENAME.log +ping6 $IPADDR -c 5 | tee $BASENAME.log # Fetch ping6 status code (not $? because this is piped) STATUS=${PIPESTATUS[0]}