commit
c450887555
11 changed files with 115 additions and 107 deletions
|
@ -10,7 +10,7 @@ before_script:
|
||||||
- "sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386 || true"
|
- "sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386 || true"
|
||||||
## Install toolchain for mc1233x in care-free way
|
## Install toolchain for mc1233x in care-free way
|
||||||
- "[ $BUILD_TYPE = compile ] && curl -s \
|
- "[ $BUILD_TYPE = compile ] && curl -s \
|
||||||
http://adamdunkels.github.com/contiki-fork/arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 \
|
https://raw.github.com/wiki/malvira/libmc1322x/files/arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 \
|
||||||
| tar xjf - -C /tmp/ && sudo cp -f -r /tmp/arm-2008q3/* /usr/ && rm -rf /tmp/arm-2008q3 && arm-none-eabi-gcc --version || true"
|
| tar xjf - -C /tmp/ && sudo cp -f -r /tmp/arm-2008q3/* /usr/ && rm -rf /tmp/arm-2008q3 && arm-none-eabi-gcc --version || true"
|
||||||
## Install SDCC from a purpose-built bundle
|
## Install SDCC from a purpose-built bundle
|
||||||
- "[ $BUILD_TYPE = compile ] && curl -s \
|
- "[ $BUILD_TYPE = compile ] && curl -s \
|
||||||
|
@ -28,6 +28,8 @@ script:
|
||||||
- "make -C regression-tests/??-$BUILD_TYPE RUNALL=true summary"
|
- "make -C regression-tests/??-$BUILD_TYPE RUNALL=true summary"
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
## Print cooja test logs
|
||||||
|
- "tail regression-tests/??-$BUILD_TYPE/*.testlog"
|
||||||
## Print a basic summary
|
## Print a basic summary
|
||||||
- "echo 'Summary:'; cat regression-tests/??-$BUILD_TYPE/summary"
|
- "echo 'Summary:'; cat regression-tests/??-$BUILD_TYPE/summary"
|
||||||
- "FAILS=`grep -c -i 'fail' regression-tests/??-$BUILD_TYPE/summary`"
|
- "FAILS=`grep -c -i 'fail' regression-tests/??-$BUILD_TYPE/summary`"
|
||||||
|
|
|
@ -1,100 +1,100 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<simconf>
|
<simconf>
|
||||||
<simulation>
|
<simulation>
|
||||||
<title>Hello World test (Cooja motes)</title>
|
<title>Hello World test (Cooja motes)</title>
|
||||||
<randomseed>generated</randomseed>
|
<randomseed>generated</randomseed>
|
||||||
<motedelay_us>1000000</motedelay_us>
|
<motedelay_us>1000000</motedelay_us>
|
||||||
<radiomedium>
|
<radiomedium>
|
||||||
se.sics.cooja.radiomediums.UDGM
|
se.sics.cooja.radiomediums.UDGM
|
||||||
<transmitting_range>50.0</transmitting_range>
|
<transmitting_range>50.0</transmitting_range>
|
||||||
<interference_range>100.0</interference_range>
|
<interference_range>100.0</interference_range>
|
||||||
<success_ratio_tx>1.0</success_ratio_tx>
|
<success_ratio_tx>1.0</success_ratio_tx>
|
||||||
<success_ratio_rx>1.0</success_ratio_rx>
|
<success_ratio_rx>1.0</success_ratio_rx>
|
||||||
</radiomedium>
|
</radiomedium>
|
||||||
<events>
|
<events>
|
||||||
<logoutput>40000</logoutput>
|
<logoutput>40000</logoutput>
|
||||||
</events>
|
</events>
|
||||||
<motetype>
|
<motetype>
|
||||||
se.sics.cooja.contikimote.ContikiMoteType
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
<identifier>mtype725</identifier>
|
<identifier>mtype725</identifier>
|
||||||
<description>Contiki Mote Type #1</description>
|
<description>Contiki Mote Type #1</description>
|
||||||
<source>[CONTIKI_DIR]/examples/hello-world/hello-world.c</source>
|
<source>[CONTIKI_DIR]/examples/hello-world/hello-world.c</source>
|
||||||
<commands>make hello-world.cooja TARGET=cooja</commands>
|
<commands>make hello-world.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>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
||||||
<symbols>false</symbols>
|
<symbols>false</symbols>
|
||||||
</motetype>
|
</motetype>
|
||||||
<mote>
|
<mote>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>69.64867743029201</x>
|
<x>69.64867743029201</x>
|
||||||
<y>69.2570131081022</y>
|
<y>69.2570131081022</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
<id>1</id>
|
<id>1</id>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<motetype_identifier>mtype725</motetype_identifier>
|
<motetype_identifier>mtype725</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
</simulation>
|
</simulation>
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.Visualizer
|
se.sics.cooja.plugins.Visualizer
|
||||||
<plugin_config>
|
<plugin_config>
|
||||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
<skin>se.sics.cooja.plugins.skins.LogVisualizerSkin</skin>
|
<skin>se.sics.cooja.plugins.skins.LogVisualizerSkin</skin>
|
||||||
<viewport>0.9090909090909091 0.0 0.0 0.9090909090909091 59.68302051791636 6.039078992634368</viewport>
|
<viewport>0.9090909090909091 0.0 0.0 0.9090909090909091 59.68302051791636 6.039078992634368</viewport>
|
||||||
</plugin_config>
|
</plugin_config>
|
||||||
<width>259</width>
|
<width>259</width>
|
||||||
<z>1</z>
|
<z>1</z>
|
||||||
<height>198</height>
|
<height>198</height>
|
||||||
<location_x>2</location_x>
|
<location_x>2</location_x>
|
||||||
<location_y>203</location_y>
|
<location_y>203</location_y>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.LogListener
|
se.sics.cooja.plugins.LogListener
|
||||||
<plugin_config>
|
<plugin_config>
|
||||||
<filter />
|
<filter />
|
||||||
</plugin_config>
|
</plugin_config>
|
||||||
<width>259</width>
|
<width>259</width>
|
||||||
<z>2</z>
|
<z>2</z>
|
||||||
<height>217</height>
|
<height>217</height>
|
||||||
<location_x>2</location_x>
|
<location_x>2</location_x>
|
||||||
<location_y>403</location_y>
|
<location_y>403</location_y>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.SimControl
|
se.sics.cooja.plugins.SimControl
|
||||||
<width>259</width>
|
<width>259</width>
|
||||||
<z>3</z>
|
<z>3</z>
|
||||||
<height>200</height>
|
<height>200</height>
|
||||||
<location_x>2</location_x>
|
<location_x>2</location_x>
|
||||||
<location_y>3</location_y>
|
<location_y>3</location_y>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.ScriptRunner
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
<plugin_config>
|
<plugin_config>
|
||||||
<scriptfile>[CONFIG_DIR]/hello-world.js</scriptfile>
|
<scriptfile>[CONFIG_DIR]/hello-world.js</scriptfile>
|
||||||
<active>true</active>
|
<active>true</active>
|
||||||
</plugin_config>
|
</plugin_config>
|
||||||
<width>592</width>
|
<width>592</width>
|
||||||
<z>0</z>
|
<z>0</z>
|
||||||
<height>618</height>
|
<height>618</height>
|
||||||
<location_x>318</location_x>
|
<location_x>318</location_x>
|
||||||
<location_y>61</location_y>
|
<location_y>61</location_y>
|
||||||
</plugin>
|
</plugin>
|
||||||
</simconf>
|
</simconf>
|
||||||
|
|
|
@ -120,7 +120,7 @@ make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202<
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.ScriptRunner
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
<plugin_config>
|
<plugin_config>
|
||||||
<script>TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
|
<script>TIMEOUT(500000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
|
||||||
count = 0;
|
count = 0;
|
||||||
while (count++ < 5) {
|
while (count++ < 5) {
|
||||||
/* Message from sender process to receiver process */
|
/* Message from sender process to receiver process */
|
||||||
|
|
|
@ -501,7 +501,7 @@ print()
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
for(i = 1; i <= nrNodes; i++) {
|
||||||
log.log("Node " + i + " ");
|
log.log("Node " + i + " ");
|
||||||
if(i == sink) {
|
if(i == sink) {
|
||||||
log.log("sink\n");
|
log.log("sink. Got " + total + " non-dups from " + num_reported + " nodes.\n");
|
||||||
} else {
|
} else {
|
||||||
log.log("received: " + received[i] + " hops: " + hops[i] + "\n");
|
log.log("received: " + received[i] + " hops: " + hops[i] + "\n");
|
||||||
}
|
}
|
||||||
|
@ -517,12 +517,15 @@ booted = new Array();
|
||||||
received = new Array();
|
received = new Array();
|
||||||
hops = new Array();
|
hops = new Array();
|
||||||
nrNodes = 25;
|
nrNodes = 25;
|
||||||
|
total = 0; /* number of non-dups the sink received */
|
||||||
|
reported = new Array(); /* nodes that have reported at least once */
|
||||||
|
|
||||||
nodes_starting = true;
|
nodes_starting = true;
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
for(i = 1; i <= nrNodes; i++) {
|
||||||
booted[i] = false;
|
booted[i] = false;
|
||||||
received[i] = "_____";
|
received[i] = "_____";
|
||||||
hops[i] = received[i];
|
hops[i] = received[i];
|
||||||
|
reported[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wait until all nodes have started */
|
/* Wait until all nodes have started */
|
||||||
|
@ -579,9 +582,11 @@ while(true) {
|
||||||
source = node_id & 0xff;
|
source = node_id & 0xff;
|
||||||
seqno = seqno - 1;
|
seqno = seqno - 1;
|
||||||
dups = received[source].substr(seqno, 1);
|
dups = received[source].substr(seqno, 1);
|
||||||
|
reported[source]++;
|
||||||
|
|
||||||
if(dups == "_") {
|
if(dups == "_") {
|
||||||
dups = 1;
|
dups = 1;
|
||||||
|
total++;
|
||||||
} else if(dups < 9) {
|
} else if(dups < 9) {
|
||||||
dups++;
|
dups++;
|
||||||
}
|
}
|
||||||
|
@ -598,12 +603,12 @@ while(true) {
|
||||||
/* Signal OK if all nodes have reported 10 messages. */
|
/* Signal OK if all nodes have reported 10 messages. */
|
||||||
num_reported = 0;
|
num_reported = 0;
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
for(i = 1; i <= nrNodes; i++) {
|
||||||
if(!isNaN(received[i])) {
|
if(reported[i] > 0) {
|
||||||
num_reported++;
|
num_reported++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(num_reported == nrNodes - 1) {
|
if((num_reported == nrNodes - 1) && (total >= 75)) {
|
||||||
print();
|
print();
|
||||||
log.testOK();
|
log.testOK();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ define dooneexample
|
||||||
$(3)-$(subst /,-,$(1))$(2).report 2>&1 && \
|
$(3)-$(subst /,-,$(1))$(2).report 2>&1 && \
|
||||||
(echo $(1) $(2): OK | tee $(3)-$(subst /,-,$(1))$(2).summary) || \
|
(echo $(1) $(2): OK | tee $(3)-$(subst /,-,$(1))$(2).summary) || \
|
||||||
(echo $(1) $(2): FAIL ಠ.ಠ | tee $(3)-$(subst /,-,$(1))$(2).summary ; \
|
(echo $(1) $(2): FAIL ಠ.ಠ | tee $(3)-$(subst /,-,$(1))$(2).summary ; \
|
||||||
tail -10 $(3)-$(subst /,-,$(1))$(2).report > $(3)-$(subst /,-,$(1))$(2).faillog))
|
tail -10 $(3)-$(subst /,-,$(1))$(2).report | tee $(3)-$(subst /,-,$(1))$(2).faillog))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define doexample
|
define doexample
|
||||||
|
|
|
@ -56,9 +56,10 @@ endif
|
||||||
|
|
||||||
%.testlog: %.csc cooja
|
%.testlog: %.csc cooja
|
||||||
@echo -n Running test $(basename $<) ... ""
|
@echo -n Running test $(basename $<) ... ""
|
||||||
@(java -jar $(CONTIKI)/tools/cooja/dist/cooja.jar \
|
@(java -Xshare:on -jar $(CONTIKI)/tools/cooja/dist/cooja.jar \
|
||||||
-nogui=$< -contiki=$(CONTIKI) > $(basename $@).log || \
|
-nogui=$< -contiki=$(CONTIKI) > $(basename $@).log || \
|
||||||
(echo " FAIL ಠ_ಠ" | tee -a COOJA.testlog; \
|
(echo " FAIL ಠ_ಠ" | tee -a COOJA.testlog; \
|
||||||
|
tail -50 COOJA.log; \
|
||||||
mv COOJA.testlog $(basename $<).faillog; \
|
mv COOJA.testlog $(basename $<).faillog; \
|
||||||
$(RUNALL))) && \
|
$(RUNALL))) && \
|
||||||
(touch COOJA.testlog; \
|
(touch COOJA.testlog; \
|
||||||
|
|
Loading…
Reference in a new issue