Merge pull request #230 from malvira/pr-travis-fixes

Travis fixes
This commit is contained in:
Mariano Alvira 2013-05-18 15:21:00 -07:00
commit c450887555
11 changed files with 115 additions and 107 deletions

View file

@ -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"
## Install toolchain for mc1233x in care-free way
- "[ $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"
## Install SDCC from a purpose-built bundle
- "[ $BUILD_TYPE = compile ] && curl -s \
@ -28,6 +28,8 @@ script:
- "make -C regression-tests/??-$BUILD_TYPE RUNALL=true summary"
after_script:
## Print cooja test logs
- "tail regression-tests/??-$BUILD_TYPE/*.testlog"
## Print a basic summary
- "echo 'Summary:'; cat regression-tests/??-$BUILD_TYPE/summary"
- "FAILS=`grep -c -i 'fail' regression-tests/??-$BUILD_TYPE/summary`"

View file

@ -1,100 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<simconf>
<simulation>
<title>Hello World test (Cooja motes)</title>
<randomseed>generated</randomseed>
<motedelay_us>1000000</motedelay_us>
<radiomedium>
se.sics.cooja.radiomediums.UDGM
<transmitting_range>50.0</transmitting_range>
<interference_range>100.0</interference_range>
<success_ratio_tx>1.0</success_ratio_tx>
<success_ratio_rx>1.0</success_ratio_rx>
</radiomedium>
<events>
<logoutput>40000</logoutput>
</events>
<motetype>
se.sics.cooja.contikimote.ContikiMoteType
<identifier>mtype725</identifier>
<description>Contiki Mote Type #1</description>
<source>[CONTIKI_DIR]/examples/hello-world/hello-world.c</source>
<commands>make hello-world.cooja TARGET=cooja</commands>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Battery</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiButton</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiClock</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
<symbols>false</symbols>
</motetype>
<mote>
<interface_config>
se.sics.cooja.interfaces.Position
<x>69.64867743029201</x>
<y>69.2570131081022</y>
<z>0.0</z>
</interface_config>
<interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
</interface_config>
<motetype_identifier>mtype725</motetype_identifier>
</mote>
</simulation>
<plugin>
se.sics.cooja.plugins.Visualizer
<plugin_config>
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
<skin>se.sics.cooja.plugins.skins.LogVisualizerSkin</skin>
<viewport>0.9090909090909091 0.0 0.0 0.9090909090909091 59.68302051791636 6.039078992634368</viewport>
</plugin_config>
<width>259</width>
<z>1</z>
<height>198</height>
<location_x>2</location_x>
<location_y>203</location_y>
</plugin>
<plugin>
se.sics.cooja.plugins.LogListener
<plugin_config>
<filter />
</plugin_config>
<width>259</width>
<z>2</z>
<height>217</height>
<location_x>2</location_x>
<location_y>403</location_y>
</plugin>
<plugin>
se.sics.cooja.plugins.SimControl
<width>259</width>
<z>3</z>
<height>200</height>
<location_x>2</location_x>
<location_y>3</location_y>
</plugin>
<plugin>
se.sics.cooja.plugins.ScriptRunner
<plugin_config>
<scriptfile>[CONFIG_DIR]/hello-world.js</scriptfile>
<active>true</active>
</plugin_config>
<width>592</width>
<z>0</z>
<height>618</height>
<location_x>318</location_x>
<location_y>61</location_y>
</plugin>
</simconf>
<?xml version="1.0" encoding="UTF-8"?>
<simconf>
<simulation>
<title>Hello World test (Cooja motes)</title>
<randomseed>generated</randomseed>
<motedelay_us>1000000</motedelay_us>
<radiomedium>
se.sics.cooja.radiomediums.UDGM
<transmitting_range>50.0</transmitting_range>
<interference_range>100.0</interference_range>
<success_ratio_tx>1.0</success_ratio_tx>
<success_ratio_rx>1.0</success_ratio_rx>
</radiomedium>
<events>
<logoutput>40000</logoutput>
</events>
<motetype>
se.sics.cooja.contikimote.ContikiMoteType
<identifier>mtype725</identifier>
<description>Contiki Mote Type #1</description>
<source>[CONTIKI_DIR]/examples/hello-world/hello-world.c</source>
<commands>make hello-world.cooja TARGET=cooja</commands>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Battery</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiButton</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiClock</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
<symbols>false</symbols>
</motetype>
<mote>
<interface_config>
se.sics.cooja.interfaces.Position
<x>69.64867743029201</x>
<y>69.2570131081022</y>
<z>0.0</z>
</interface_config>
<interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
</interface_config>
<motetype_identifier>mtype725</motetype_identifier>
</mote>
</simulation>
<plugin>
se.sics.cooja.plugins.Visualizer
<plugin_config>
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
<skin>se.sics.cooja.plugins.skins.LogVisualizerSkin</skin>
<viewport>0.9090909090909091 0.0 0.0 0.9090909090909091 59.68302051791636 6.039078992634368</viewport>
</plugin_config>
<width>259</width>
<z>1</z>
<height>198</height>
<location_x>2</location_x>
<location_y>203</location_y>
</plugin>
<plugin>
se.sics.cooja.plugins.LogListener
<plugin_config>
<filter />
</plugin_config>
<width>259</width>
<z>2</z>
<height>217</height>
<location_x>2</location_x>
<location_y>403</location_y>
</plugin>
<plugin>
se.sics.cooja.plugins.SimControl
<width>259</width>
<z>3</z>
<height>200</height>
<location_x>2</location_x>
<location_y>3</location_y>
</plugin>
<plugin>
se.sics.cooja.plugins.ScriptRunner
<plugin_config>
<scriptfile>[CONFIG_DIR]/hello-world.js</scriptfile>
<active>true</active>
</plugin_config>
<width>592</width>
<z>0</z>
<height>618</height>
<location_x>318</location_x>
<location_y>61</location_y>
</plugin>
</simconf>

View file

@ -120,7 +120,7 @@ make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202<
<plugin>
se.sics.cooja.plugins.ScriptRunner
<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;
while (count++ &lt; 5) {
/* Message from sender process to receiver process */

View file

@ -501,7 +501,7 @@ print()
for(i = 1; i &lt;= nrNodes; i++) {
log.log("Node " + i + " ");
if(i == sink) {
log.log("sink\n");
log.log("sink. Got " + total + " non-dups from " + num_reported + " nodes.\n");
} else {
log.log("received: " + received[i] + " hops: " + hops[i] + "\n");
}
@ -517,12 +517,15 @@ booted = new Array();
received = new Array();
hops = new Array();
nrNodes = 25;
total = 0; /* number of non-dups the sink received */
reported = new Array(); /* nodes that have reported at least once */
nodes_starting = true;
for(i = 1; i &lt;= nrNodes; i++) {
booted[i] = false;
received[i] = "_____";
hops[i] = received[i];
reported[i] = 0;
}
/* Wait until all nodes have started */
@ -579,9 +582,11 @@ while(true) {
source = node_id &amp; 0xff;
seqno = seqno - 1;
dups = received[source].substr(seqno, 1);
reported[source]++;
if(dups == "_") {
dups = 1;
total++;
} else if(dups &lt; 9) {
dups++;
}
@ -598,12 +603,12 @@ while(true) {
/* Signal OK if all nodes have reported 10 messages. */
num_reported = 0;
for(i = 1; i &lt;= nrNodes; i++) {
if(!isNaN(received[i])) {
if(reported[i] &gt; 0) {
num_reported++;
}
}
if(num_reported == nrNodes - 1) {
if((num_reported == nrNodes - 1) &amp;&amp; (total &gt;= 75)) {
print();
log.testOK();
}

View file

@ -44,7 +44,7 @@ define dooneexample
$(3)-$(subst /,-,$(1))$(2).report 2>&1 && \
(echo $(1) $(2): OK | 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
define doexample

View file

@ -56,9 +56,10 @@ endif
%.testlog: %.csc cooja
@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 || \
(echo " FAIL ಠ_ಠ" | tee -a COOJA.testlog; \
tail -50 COOJA.log; \
mv COOJA.testlog $(basename $<).faillog; \
$(RUNALL))) && \
(touch COOJA.testlog; \