Moved the Contiki tests from the tools/cooja directory into the regression-tests/ directory

This commit is contained in:
Adam Dunkels 2012-12-08 22:20:11 +01:00
parent 15d2c10633
commit d917d64cfb
71 changed files with 153 additions and 387 deletions

View file

@ -1,135 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<simconf> <simconf>
<project>../apps/mrm</project> <project EXPORT="discard">[APPS_DIR]/mrm</project>
<project>../apps/mspsim</project> <project EXPORT="discard">[APPS_DIR]/mspsim</project>
<project>../apps/avrora</project> <project EXPORT="discard">[APPS_DIR]/avrora</project>
<project>../apps/native_gateway</project> <project EXPORT="discard">[APPS_DIR]/serial_socket</project>
<simulation> <project EXPORT="discard">[APPS_DIR]/collect-view</project>
<title>My simulation</title> <project EXPORT="discard">[APPS_DIR]/powertracker</project>
<delaytime>0</delaytime> <simulation>
<randomseed>generated</randomseed> <title>My simulation</title>
<motedelay_us>1000000</motedelay_us> <randomseed>generated</randomseed>
<radiomedium> <motedelay_us>1000000</motedelay_us>
se.sics.cooja.radiomediums.UDGM <radiomedium>
<transmitting_range>50.0</transmitting_range> se.sics.cooja.radiomediums.UDGM
<interference_range>100.0</interference_range> <transmitting_range>50.0</transmitting_range>
<success_ratio_tx>1.0</success_ratio_tx> <interference_range>100.0</interference_range>
<success_ratio_rx>1.0</success_ratio_rx> <success_ratio_tx>1.0</success_ratio_tx>
</radiomedium> <success_ratio_rx>1.0</success_ratio_rx>
<motetype> </radiomedium>
se.sics.cooja.mspmote.SkyMoteType <events>
<identifier>sky1</identifier> <logoutput>40000</logoutput>
<description>Sky Mote Type #1</description> </events>
<source>../../../examples/multi-threading/multi-threading.c</source> <motetype>
<commands>make clean TARGET=sky se.sics.cooja.mspmote.SkyMoteType
make multi-threading.sky TARGET=sky</commands> <identifier>sky1</identifier>
<firmware>../../../examples/multi-threading/multi-threading.sky</firmware> <description>Sky Mote Type #1</description>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <source EXPORT="discard">[CONTIKI_DIR]/examples/multi-threading/multi-threading.c</source>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <commands EXPORT="discard">make clean TARGET=sky
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> make multi-threading.sky TARGET=sky</commands>
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface> <firmware EXPORT="copy">[CONTIKI_DIR]/examples/multi-threading/multi-threading.sky</firmware>
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkySerial</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
</motetype> <moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
<mote> <moteinterface>se.sics.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
se.sics.cooja.mspmote.SkyMote <moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
<motetype_identifier>sky1</motetype_identifier> <moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
<breakpoints /> </motetype>
<interface_config> <mote>
se.sics.cooja.interfaces.Position <breakpoints />
<x>83.20518861404864</x> <interface_config>
<y>11.060511519885651</y> se.sics.cooja.interfaces.Position
<z>0.0</z> <x>83.20518861404864</x>
</interface_config> <y>11.060511519885651</y>
<interface_config> <z>0.0</z>
se.sics.cooja.mspmote.interfaces.MspMoteID </interface_config>
<id>1</id> <interface_config>
</interface_config> se.sics.cooja.mspmote.interfaces.MspMoteID
</mote> <id>1</id>
</simulation> </interface_config>
<plugin> <motetype_identifier>sky1</motetype_identifier>
se.sics.cooja.plugins.SimControl </mote>
<width>265</width> </simulation>
<z>3</z> <plugin>
<height>200</height> se.sics.cooja.plugins.SimControl
<location_x>0</location_x> <width>265</width>
<location_y>0</location_y> <z>3</z>
<minimized>false</minimized> <height>200</height>
</plugin> <location_x>0</location_x>
<plugin> <location_y>0</location_y>
se.sics.cooja.plugins.Visualizer </plugin>
<plugin_config /> <plugin>
<width>263</width> se.sics.cooja.plugins.Visualizer
<z>2</z> <plugin_config>
<height>292</height> <viewport>0.9090909090909091 0.0 0.0 0.9090909090909091 49.35891944177396 108.94498952737668</viewport>
<location_x>1</location_x> </plugin_config>
<location_y>202</location_y> <width>263</width>
<minimized>false</minimized> <z>2</z>
</plugin> <height>292</height>
<plugin> <location_x>1</location_x>
se.sics.cooja.plugins.LogListener <location_y>202</location_y>
<plugin_config> </plugin>
<filter /> <plugin>
</plugin_config> se.sics.cooja.plugins.LogListener
<width>865</width> <plugin_config>
<z>0</z> <filter />
<height>209</height> <formatted_time />
<location_x>3</location_x> </plugin_config>
<location_y>701</location_y> <width>865</width>
<minimized>false</minimized> <z>0</z>
</plugin> <height>209</height>
<plugin> <location_x>3</location_x>
se.sics.cooja.plugins.ScriptRunner <location_y>701</location_y>
<plugin_config> </plugin>
<script>TIMEOUT(60000, log.log("nrLowAlpha: " + nrLowAlpha + "\nnrHighAlpha: " + nrHighAlpha + "\nnrLowCount: " + nrLowCount + "\nnrHighCount: " + nrHighCount + "\n")); <plugin>
se.sics.cooja.plugins.ScriptRunner
lowAlpha = "BA"; <plugin_config>
highAlpha = "JIHGFEDCBA"; <script>TIMEOUT(60000, log.log("nrLowAlpha: " + nrLowAlpha + "\nnrHighAlpha: " + nrHighAlpha + "\nnrLowCount: " + nrLowCount + "\nnrHighCount: " + nrHighCount + "\n"));
lowCount = "10";
highCount = "9876543210"; lowAlpha = "BA";
highAlpha = "JIHGFEDCBA";
nrLowAlpha = 0; lowCount = "10";
nrHighAlpha = 0; highCount = "9876543210";
nrLowCount = 0;
nrHighCount = 0; nrLowAlpha = 0;
nrHighAlpha = 0;
while (true) { nrLowCount = 0;
nrHighCount = 0;
if (msg.equals(lowCount)) {
//log.log("Count is low\n"); while (true) {
nrLowCount++;
} else if (msg.equals(lowAlpha)) { if (msg.equals(lowCount)) {
//log.log("Alpha is low\n"); //log.log("Count is low\n");
nrLowAlpha++; nrLowCount++;
} else if (msg.equals(highCount)) { } else if (msg.equals(lowAlpha)) {
//log.log("Count is high\n"); //log.log("Alpha is low\n");
nrHighCount++; nrLowAlpha++;
} else if (msg.equals(highAlpha)) { } else if (msg.equals(highCount)) {
//log.log("Alpha is high\n"); //log.log("Count is high\n");
nrHighAlpha++; nrHighCount++;
} } else if (msg.equals(highAlpha)) {
//log.log("Alpha is high\n");
if (nrLowCount &gt;= 5 &amp;&amp; nrHighAlpha++;
nrLowAlpha &gt;= 5 &amp;&amp; }
nrLowCount &gt;= 5 &amp;&amp;
nrHighCount &gt;= 5 &amp;&amp; if (nrLowCount &gt;= 5 &amp;&amp;
nrHighAlpha &gt;= 5) { nrLowAlpha &gt;= 5 &amp;&amp;
log.testOK(); nrLowCount &gt;= 5 &amp;&amp;
} nrHighCount &gt;= 5 &amp;&amp;
YIELD(); nrHighAlpha &gt;= 5) {
}</script> log.testOK();
<active>true</active> }
</plugin_config> YIELD();
<width>600</width> }</script>
<z>1</z> <active>true</active>
<height>700</height> </plugin_config>
<location_x>267</location_x> <width>600</width>
<location_y>1</location_y> <z>1</z>
<minimized>false</minimized> <height>700</height>
</plugin> <location_x>267</location_x>
</simconf> <location_y>1</location_y>
</plugin>
</simconf>

View file

@ -20,10 +20,10 @@
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>../../../examples/sky-shell/sky-checkpoint.c</source> <source>../../examples/sky-shell/sky-checkpoint.c</source>
<commands>make clean TARGET=sky <commands>make clean TARGET=sky
make sky-checkpoint.sky TARGET=sky</commands> make sky-checkpoint.sky TARGET=sky</commands>
<firmware>../../../examples/sky-shell/sky-checkpoint.sky</firmware> <firmware>../../examples/sky-shell/sky-checkpoint.sky</firmware>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>

View file

@ -20,7 +20,7 @@
se.sics.cooja.contikimote.ContikiMoteType se.sics.cooja.contikimote.ContikiMoteType
<identifier>mtype296</identifier> <identifier>mtype296</identifier>
<description>Contiki Mote #1</description> <description>Contiki Mote #1</description>
<contikiapp>../../../examples/rime/example-rucb.c</contikiapp> <contikiapp>[CONTIKI_DIR]/examples/rime/example-rucb.c</contikiapp>
<commands>make example-rucb.cooja TARGET=cooja</commands> <commands>make example-rucb.cooja TARGET=cooja</commands>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Battery</moteinterface> <moteinterface>se.sics.cooja.interfaces.Battery</moteinterface>

View file

@ -20,10 +20,10 @@
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>../../../examples/rime/example-abc.c</source> <source>[CONTIKI_DIR]/examples/rime/example-abc.c</source>
<commands>make clean TARGET=sky <commands>make clean TARGET=sky
make example-abc.sky TARGET=sky</commands> make example-abc.sky TARGET=sky</commands>
<firmware>../../../examples/rime/example-abc.sky</firmware> <firmware>[CONTIKI_DIR]/examples/rime/example-abc.sky</firmware>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>

View file

@ -20,10 +20,10 @@
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>../../../examples/sky/test-deluge.c</source> <source>[CONTIKI_DIR]/examples/sky/test-deluge.c</source>
<commands>make clean TARGET=sky <commands>make clean TARGET=sky
make APPS=deluge test-deluge.sky TARGET=sky</commands> make APPS=deluge test-deluge.sky TARGET=sky</commands>
<firmware>../../../examples/sky/test-deluge.sky</firmware> <firmware>[CONTIKI_DIR]/examples/sky/test-deluge.sky</firmware>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>

View file

@ -20,10 +20,10 @@
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>../../../examples/rime/example-runicast.c</source> <source>[CONTIKI_DIR]/examples/rime/example-runicast.c</source>
<commands>make clean TARGET=sky <commands>make clean TARGET=sky
make example-runicast.sky TARGET=sky</commands> make example-runicast.sky TARGET=sky</commands>
<firmware>../../../examples/rime/example-runicast.sky</firmware> <firmware>[CONTIKI_DIR]/examples/rime/example-runicast.sky</firmware>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>

View file

@ -20,10 +20,10 @@
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>../../../examples/rime/example-trickle.c</source> <source>[CONTIKI_DIR]/examples/rime/example-trickle.c</source>
<commands>make clean TARGET=sky <commands>make clean TARGET=sky
make example-trickle.sky TARGET=sky</commands> make example-trickle.sky TARGET=sky</commands>
<firmware>../../../examples/rime/example-trickle.sky</firmware> <firmware>[CONTIKI_DIR]/examples/rime/example-trickle.sky</firmware>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>

View file

@ -20,10 +20,10 @@
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>../../../examples/sky/sky-collect.c</source> <source>[CONTIKI_DIR]/examples/sky/sky-collect.c</source>
<commands>make clean TARGET=sky <commands>make clean TARGET=sky
make sky-collect.sky TARGET=sky</commands> make sky-collect.sky TARGET=sky</commands>
<firmware>../../../examples/sky/sky-collect.sky</firmware> <firmware>[CONTIKI_DIR]/examples/sky/sky-collect.sky</firmware>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>

View file

@ -94,7 +94,7 @@ make hello-world.ce TARGET=sky SMALL=0</commands>
<plugin_config> <plugin_config>
<script>TIMEOUT(50000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */ <script>TIMEOUT(50000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
helloworld = new java.io.File("../../../examples/sky-shell-exec/hello-world.ce"); helloworld = new java.io.File("../../examples/sky-shell-exec/hello-world.ce");
log.log("Running test on: " + helloworld.getAbsolutePath() + "\n"); log.log("Running test on: " + helloworld.getAbsolutePath() + "\n");
if (!helloworld.exists()) { if (!helloworld.exists()) {
log.log("hello-world.ce does not exist\n"); log.log("hello-world.ce does not exist\n");

View file

@ -49,7 +49,7 @@ make udp-server.cooja TARGET=cooja</commands>
<identifier>mtype512</identifier> <identifier>mtype512</identifier>
<description>Sender</description> <description>Sender</description>
<contikiapp>[CONTIKI_DIR]/examples/udp-ipv6/udp-client.c</contikiapp> <contikiapp>[CONTIKI_DIR]/examples/udp-ipv6/udp-client.c</contikiapp>
<commands>make udp-client.cooja TARGET=cooja DEFINES=UDP_CONNECTION_ADDR=fe80::301:1ff:fe01:101</commands> <commands>make udp-client.cooja TARGET=cooja DEFINES=UDP_CONNECTION_ADDR=fe80::201:1:1:1</commands>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Battery</moteinterface> <moteinterface>se.sics.cooja.interfaces.Battery</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface> <moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface>

View file

@ -21,7 +21,7 @@ sim.setSpeedLimit(1.0);
/* create tunnel interface */ /* create tunnel interface */
log.log("create tunnel interface\n"); log.log("create tunnel interface\n");
launcher = new java.lang.ProcessBuilder["(java.lang.String[])"](['sh','-c',CMD_TUNNEL]); launcher = new java.lang.ProcessBuilder["(java.lang.String[])"](['sh','-c',CMD_TUNNEL]);
launcher.directory(new java.io.File("../../../examples/er-rest-example")); launcher.directory(new java.io.File("../../examples/er-rest-example"));
launcher.redirectErrorStream(true); launcher.redirectErrorStream(true);
tunProcess = launcher.start(); tunProcess = launcher.start();
tunRunnable = new Object(); tunRunnable = new Object();

View file

@ -1,97 +0,0 @@
#!/bin/bash
#LOG="TEST-`date '+%F'`.log"
LOG=currentlog.log
MAIL=0
CVS=0
PROGNAME=`basename $0`
Usage() {
echo >&2 "$PROGNAME:" "$@"
echo >&2 "Usage: $PROGNAME [-cvs] [-mail]"
exit 10
}
while [ $# -gt 0 ]; do
case "$1" in
-cvs) CVS=1 ;;
-mail) MAIL=1 ;;
*) Usage "Unknown option \"$1\"" ;;
esac
shift
done
if [ -z "$CONTIKI" ]; then
if [ -z "$CONTIKI_HOME" ]; then
CONTIKI_HOME=../../..
echo Undefined variable: CONTIKI_HOME. Using default: ${CONTIKI_HOME}
fi
CONTIKI=$CONTIKI_HOME
fi
if [ $MAIL -eq 1 ]; then
if [ -z "$MAILTO" ]; then
echo Undefined variable: MAILTO
exit 1
fi
fi
function mail_report() {
if [ $MAIL -eq 1 ]; then
echo ">>>>>>> Sending mail <<<<<<<<"
echo "[`date '+%F %T'`] Mailing test report" >> $LOG
cat $LOG | mail -s "Contiki test results" $MAILTO
if [ "$?" -ne 0 ]; then
echo "Failed to send mail"
echo "[`date '+%F %T'`] MAIL FAILED" >> $LOG
else
echo "[`date '+%F %T'`] test report sent" >> $LOG
fi
else
echo
echo
echo ">>>>>>> Test Report <<<<<<<<"
cat $LOG
fi
cp $LOG RUN_ALL_LAST.log
}
echo ">>>>>>> Cleaning up previous tests <<<<<<<<"
rm -f *.log *.cooja_log
rm -fr se obj_cooja
rm -f symbols.c symbols.h
echo ">>>>>>> Creating test log <<<<<<<<"
touch $LOG
if [ $CVS -eq 1 ]; then
echo ">>>>>>> Updating from CVS <<<<<<<<"
echo -n "[`date '+%F %T'`] Updating CVS: " >> $LOG
(cd $CONTIKI && cvs update -dP)
if [ "$?" != "0" ]; then
echo "FAIL" >> $LOG
mail_report
exit 1
fi
echo "OK" >> $LOG
fi
echo ">>>>>>> Building COOJA <<<<<<<<"
echo -n "[`date '+%F %T'`] Building COOJA: " >> $LOG
(cd $CONTIKI/tools/cooja && ant clean && ant jar)
if [ "$?" != "0" ]; then
echo "Compilation of COOJA failed"
echo "FAIL" >> $LOG
mail_report
exit 1
fi
echo "OK" >> $LOG
echo >> $LOG
for myfile in ./*.csc
do
TEST=`basename $myfile .csc`
bash RUN_TEST $TEST $LOG
done
mail_report

View file

@ -1,45 +0,0 @@
#!/bin/bash
# Usage
if [ $# -eq 2 ]; then
REPEATS=$1
TEST=$2
else
echo "Usage: $0 <nr_repeats> <test>"
echo "Example: $0 10 cooja_helloworld"
exit 1
fi
# Locate Contiki/COOJA
if [ -z "$CONTIKI" ]; then
if [ -z "$CONTIKI_HOME" ]; then
CONTIKI_HOME=../../..
fi
CONTIKI=$CONTIKI_HOME
fi
# Clean up
rm -f *.log *.cooja_log
rm -fr se obj_cooja
rm -f symbols.c symbols.h
# Compile COOJA
echo ">>>>>>> Building COOJA <<<<<<<<"
(cd $CONTIKI/tools/cooja && ant clean && ant jar)
if [ "$?" != "0" ]; then
echo "Compilation of COOJA failed"
exit 1
fi
# Run tests
for COUNTER in `seq 1 $REPEATS`;
do
echo ">>>>>>> Test $COUNTER/$REPEATS: $TEST-$COUNTER.log <<<<<<<<"
bash RUN_TEST $TEST RUN_REPEATED_LAST.log
mv $TEST.log $TEST-$COUNTER.log
done
echo
cat RUN_REPEATED_LAST.log
echo
echo ">>>>>>> DONE! Test logs stored in $TEST-[1-$REPEATS].log <<<<<<<<"

View file

@ -1,63 +0,0 @@
#!/bin/bash
if [ $# -lt 1 -o $# -gt 2 ]; then
echo "Usage: $0 <test> [logfile]"
exit
fi
TEST=$1
LOG=/dev/null
if [ $# -eq 2 ]; then
LOG=$2
fi
echo ">>>>>>> Starting test: $TEST <<<<<<<<"
echo -n "[`date '+%F %T'`] $TEST: " >> $LOG
if [ -f "COOJA.log" ]; then
rm COOJA.log
fi
if [ -f "COOJA.testlog" ]; then
rm COOJA.testlog
fi
java -mx512m -jar ../dist/cooja.jar -nogui=$TEST.csc
if [ -f "COOJA.log" ]; then
mv COOJA.log $TEST.cooja_log
fi
if [ -f "COOJA.testlog" ]; then
mv COOJA.testlog $TEST.log
fi
OK=0
if [ -f "$TEST.log" ]; then
OK=`grep "TEST OK" $TEST.log | wc -l`
fi
if [ $OK == 0 ]; then
echo "FAIL" >> $LOG
if [ -f "$TEST.info" ]; then
echo "-- TEST INFO ($TEST.info) --" >> $LOG
cat $TEST.info >> $LOG
else
echo "-- NO TEST INFO AVAILABLE ($TEST.info) --" >> $LOG
fi
if [ -f "$TEST.log" ]; then
echo "-- TEST OUTPUT (tail $TEST.log) --" >> $LOG
tail -5 $TEST.log >> $LOG
else
echo "-- NO TEST OUTPUT AVAILABLE ($TEST.log) --" >> $LOG
fi
echo "-- COOJA OUTPUT (tail $TEST.cooja_log) --" >> $LOG
tail -10 $TEST.cooja_log >> $LOG
echo >> $LOG
else
echo "OK" >> $LOG
fi
echo >> $LOG
if [ $OK == 0 ]; then
echo ">>>>>>> Finished test: $TEST FAILED <<<<<<<<"
else
echo ">>>>>>> Finished test: $TEST OK <<<<<<<<"
fi
echo ""

View file

@ -1 +0,0 @@
Hello world test (single node, OS-level)

View file

@ -1,2 +0,0 @@
Two COOJA nodes: examples/udp-ipv6/udp-{server,client}.c.
Test success after 5 replies

View file

@ -1 +0,0 @@
Cross-level communication test. Cooja+Sky+ESB+App running nullmac and Rime example-abc. Requires compilation in /tools/cooja/examples/appmote_rimeabc.

View file

@ -1 +0,0 @@
Single ESB mote running Hello world application

View file

@ -1,2 +0,0 @@
Five Contiki motes in a line, all running examples/telnet-server/telnet-server.c. Mote 1 (172.16.1.0) is connected to the native network via Native IP Gateway.
Test succeeds if all five nodes can be pinged from the native network (at least 10/20 ping replies must be received from each mote).

View file

@ -1 +0,0 @@
1xSky node: examples/sky-ip/sky-telnet-server.c. Sends 10 pings to 172.16.1.0 via the native IP stack. Test succeeds if more than 5 ping replies are received.

View file

@ -1 +0,0 @@
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-

View file

@ -1 +0,0 @@
Single Sky node running examples/multi-threading/multi-threading.c. Waits until both threads have counted up and down 5 times.

View file

@ -1 +0,0 @@
Two Sky nodes running Rime anonymous broadcast (examples/rime/example-abc.c). Test finishes when both nodes have received more than 30 messages each.

View file

@ -1 +0,0 @@
50 Contiki motes running examples/rime/example-collect.c. The sink is randomly created after startup. The test fails if the sink receives less than 8 packets from each node before timeout, or if the sink receives 15 packets from any node (fairness). Test timeout: 600 seconds.

View file

@ -1 +0,0 @@
Tests the Rime collect primitive on the sky platform, uses the code in examples/rime/example-collect.c

View file

@ -1 +0,0 @@
Two OS-level nodes: examples/rime/example-rucb.c. 99% TX success.

View file

@ -1 +0,0 @@
4 Sky nodes running examples/rime/example-runicast.c. Tests both timeout and send acknowledgements.

View file

@ -1 +0,0 @@
Rime trickle (test-trickle.c). Ten Sky nodes, node one send message.

View file

@ -1 +0,0 @@
Sky IPv6 RPL test: 24 nodes sending data over UDP to one sink. 10 packets per node should be received.

View file

@ -1 +0,0 @@
Tests node local checkpointing on the Sky platform. A single node checkpoints and rollbacks with a repeating echo background process. Running examples/sky-shell/sky-checkpoint.c

View file

@ -1 +0,0 @@
Single Sky node. Coffee consistency test.

View file

@ -1 +0,0 @@
Sky-collect running on 7 Sky nodes. Test waits until sensor data has been received from every node at least 5 times. If any node successfully transmits 20 packets to the sink, the test fails.

View file

@ -1 +0,0 @@
Three Sky nodes running a Deluge test. examples/sky/test-deluge.c

View file

@ -1 +0,0 @@
Single sky mote running Hello world application

View file

@ -1 +0,0 @@
IPv6 multihop routing using Rime route discovery using 5 Sky nodes. Test success when client receives response from server.

View file

@ -1,2 +0,0 @@
Two Sky nodes: examples/udp-ipv6/udp-{server,client}.c.
Test success after 5 replies

View file

@ -1 +0,0 @@
Contiki shell on a single Tmote Sky. When the node has booted, a two commands are sent to the shell: help and ps

View file

@ -1 +0,0 @@
Sky shell collect test

View file

@ -1 +0,0 @@
This test tries to compile and run the Contiki shell on the Tmote Sky. The test succeeds when contiki-sky-main.c prints out the word "Contiki".

View file

@ -1 +0,0 @@
Tests shell command 'download' (source examples/sky-shell/sky-checkpoint.c): Two nodes generates, appends to, and downloads files from each other. Default netstack + UDGM radio medium 95%

View file

@ -1 +0,0 @@
Tests Contiki ELF loader and shell command 'exec': Hello-world is compiled as a Contiki executable (.ce) and is uploaded to the single Sky node via serial port (base64 encoded). The node then loads and starts the uploaded hello-world application. Test succeeds when the 'Hello, World' output appears

View file

@ -1 +0,0 @@
Tests shell command 'sendcmd' (source examples/sky-shell/sky-checkpoint.c): A single node sends echo commands to three other nodes. X-MAC + UDGM radio medium 100%