1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Travis: print verbose build log only if build errors

This commit is contained in:
Ivan Grokhotkov 2016-03-03 17:52:46 +03:00
parent 53ba831c90
commit ec99268824

View File

@ -17,18 +17,21 @@ function build_sketches()
continue
fi;
if [[ -f "$sketchdir/.test.skip" ]]; then
echo -e "\n\n ------------ Skipping $sketch ------------ \n\n";
echo -e "\n ------------ Skipping $sketch ------------ \n";
continue
fi
echo -e "\n\n ------------ Building $sketch ------------ \n\n";
echo -e "\n ------------ Building $sketch ------------ \n";
# $arduino --verify $sketch;
echo "$build_cmd $sketch"
time $build_cmd $sketch
time ($build_cmd $sketch >build.log)
local result=$?
if [ $result -ne 0 ]; then
echo "Build failed ($1)"
echo "Build log:"
cat build.log
return $result
fi
rm build.log
done
}