diff --git a/.travis.yml b/.travis.yml index a06b17454..1dd3e89a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ before_script: - WGET="travis_retry wget --continue --tries=20 --waitretry=10 --retry-connrefused --no-dns-cache --timeout 300" - sudo apt-get -qq update + ## Support building a binary that is identical to the CI + - echo -n "Contiki will be compiled with RELSTR=" ; git --git-dir .git describe --tags --always + ## Install msp430 toolchain - sudo apt-get -qq install lib32z1 - $WGET http://adamdunkels.github.io/contiki-fork/mspgcc-4.7.0-compiled.tar.bz2 && diff --git a/Makefile.include b/Makefile.include index 11bf809b9..63c3e63df 100644 --- a/Makefile.include +++ b/Makefile.include @@ -35,6 +35,13 @@ ifndef HOST_OS endif endif +#More debug information when running in CI +ifdef CI + ifeq ($(CI),true) + V = 1 + endif +endif + usage: @echo "make MAKETARGETS... [TARGET=(TARGET)] [savetarget] [targets]" @@ -152,8 +159,10 @@ CFLAGS += ${addprefix -I,$(SOURCEDIRS) $(CONTIKI)} ### Check for a git repo and pass version if found ### git.exe in Windows cmd shells may require no stderr redirection -#RELSTR=${shell git describe --tags} -RELSTR:=${shell git --git-dir ${CONTIKI}/.git describe --tags 2>/dev/null} +ifndef RELSTR +RELSTR:=${shell git --git-dir ${CONTIKI}/.git describe --tags --always} +endif + ifneq ($(RELSTR),) CFLAGS += -DCONTIKI_VERSION_STRING=\"Contiki-$(RELSTR)\" endif diff --git a/regression-tests/simexec.sh b/regression-tests/simexec.sh index cb6d5e5b0..66f81fd6a 100755 --- a/regression-tests/simexec.sh +++ b/regression-tests/simexec.sh @@ -54,12 +54,15 @@ while (( "$#" )); do #Verbose output when using CI - if [ "$CI" = "true" ]; then - echo "==== COOJA.log ====" ; cat COOJA.log; - echo "==== COOJA.testlog ====" ; cat COOJA.testlog; - else - tail -50 COOJA.log ; - fi; + if [ "$CI" = "true" ]; then + echo "==== COOJA.log ====" ; cat COOJA.log; + echo "==== COOJA.testlog ====" ; cat COOJA.testlog; + echo "==== Files used for simulation (sha1sum) ====" + grep "Loading firmware from:" COOJA.log | cut -d " " -f 10 | uniq | xargs -r sha1sum + grep "Creating core communicator between Java class" COOJA.log | cut -d " " -f 17 | uniq | xargs -r sha1sum + else + tail -50 COOJA.log ; + fi; mv COOJA.testlog $BASENAME.$RANDOMSEED.faillog diff --git a/tools/cooja/java/org/contikios/cooja/contikimote/ContikiMoteType.java b/tools/cooja/java/org/contikios/cooja/contikimote/ContikiMoteType.java index c80c375b1..eef80bbc8 100644 --- a/tools/cooja/java/org/contikios/cooja/contikimote/ContikiMoteType.java +++ b/tools/cooja/java/org/contikios/cooja/contikimote/ContikiMoteType.java @@ -403,7 +403,7 @@ public class ContikiMoteType implements MoteType { } // Allocate core communicator class - logger.info("Creating core communicator between Java class '" + javaClassName + "' and Contiki library '" + getContikiFirmwareFile().getName() + "'"); + logger.info("Creating core communicator between Java class " + javaClassName + " and Contiki library '" + getContikiFirmwareFile().getPath() + ""); myCoreComm = CoreComm.createCoreComm(this.javaClassName, getContikiFirmwareFile()); /* Parse addresses using map file