commit
c450887555
|
@ -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`"
|
||||
|
|
|
@ -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++ < 5) {
|
||||
/* Message from sender process to receiver process */
|
||||
|
|
|
@ -501,7 +501,7 @@ print()
|
|||
for(i = 1; i <= 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 <= 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 & 0xff;
|
||||
seqno = seqno - 1;
|
||||
dups = received[source].substr(seqno, 1);
|
||||
reported[source]++;
|
||||
|
||||
if(dups == "_") {
|
||||
dups = 1;
|
||||
total++;
|
||||
} else if(dups < 9) {
|
||||
dups++;
|
||||
}
|
||||
|
@ -598,12 +603,12 @@ while(true) {
|
|||
/* Signal OK if all nodes have reported 10 messages. */
|
||||
num_reported = 0;
|
||||
for(i = 1; i <= nrNodes; i++) {
|
||||
if(!isNaN(received[i])) {
|
||||
if(reported[i] > 0) {
|
||||
num_reported++;
|
||||
}
|
||||
}
|
||||
|
||||
if(num_reported == nrNodes - 1) {
|
||||
if((num_reported == nrNodes - 1) && (total >= 75)) {
|
||||
print();
|
||||
log.testOK();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; \
|
||||
|
|
Loading…
Reference in a new issue