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:
22
tests/common.sh
Executable file
22
tests/common.sh
Executable 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
|
||||
}
|
Reference in New Issue
Block a user