1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00
esp8266/tests/common.sh
Ivan Grokhotkov 496da02f14 Verify sketches as part of travis build
Squashed commits:
[7d1b42f] Encrypt token, skip some tests
[17b8f39] Fix sha1 example path
[f3050b1] Fix build, add webhook
[fd2c9bd] Fix build errors, update mDNS library readme
[7b87031] Make common.sh more flexible
[3ba3eb2] Test all sketches
[87beb8a] Build all sketches in esp8266 core
[f2464f1] Fix paths
[823a9ae] Remove sudo usage
[7fce734] Fix arduino commands
[619bc7d] Move all commands into travis script
[15a5ada] First attempt test runner
2015-07-23 16:06:07 +03:00

23 lines
626 B
Bash
Executable File

#!/bin/bash
function build_sketches()
{
local arduino=$1
local srcpath=$2
local sketches=$(find $srcpath -name *.ino)
for sketch in $sketches; do
local sketchdir=$(dirname $sketch)
if [[ -f "$sketchdir/.test.skip" ]]; then
echo -e "\n\n ------------ Skipping $sketch ------------ \n\n";
continue
fi
echo -e "\n\n ------------ Building $sketch ------------ \n\n";
$arduino --verify --verbose $sketch;
local result=$?
if [ $result -ne 0 ]; then
echo "Build failed ($1)"
return $result
fi
done
}