From 16921691383a86cbbf2387f975e0f97d3d9356eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20=27Morty=27=20Str=C3=BCbe?= Date: Tue, 14 Oct 2014 09:55:20 +0200 Subject: [PATCH] Output sha1sums of files used for simulation on fail This helps reproducing results from the CI --- regression-tests/simexec.sh | 15 +++++++++------ .../cooja/contikimote/ContikiMoteType.java | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) 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