1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

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
This commit is contained in:
Ivan Grokhotkov
2015-07-23 12:11:59 +03:00
parent d35b72d41c
commit 496da02f14
10 changed files with 115 additions and 91 deletions

22
tests/common.sh Executable file
View File

@ -0,0 +1,22 @@
#!/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
}