Skip to content

Commit ec99268

Browse files
committed
Travis: print verbose build log only if build errors
1 parent 53ba831 commit ec99268

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/common.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@ function build_sketches()
1717
continue
1818
fi;
1919
if [[ -f "$sketchdir/.test.skip" ]]; then
20-
echo -e "\n\n ------------ Skipping $sketch ------------ \n\n";
20+
echo -e "\n ------------ Skipping $sketch ------------ \n";
2121
continue
2222
fi
23-
echo -e "\n\n ------------ Building $sketch ------------ \n\n";
23+
echo -e "\n ------------ Building $sketch ------------ \n";
2424
# $arduino --verify $sketch;
2525
echo "$build_cmd $sketch"
26-
time $build_cmd $sketch
26+
time ($build_cmd $sketch >build.log)
2727
local result=$?
2828
if [ $result -ne 0 ]; then
2929
echo "Build failed ($1)"
30+
echo "Build log:"
31+
cat build.log
3032
return $result
3133
fi
34+
rm build.log
3235
done
3336
}
3437

0 commit comments

Comments
 (0)