You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Turn on/off arduino verbose output during compilation. This will show all the co
89
89
Pass some parameters from .travis.yml to the script. `build_sketch` will echo the arduino exit code to the log, which is documented at https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#exit-status.
90
90
- Parameter: **sketchPath** - Path to a sketch or folder containing sketches. If a folder is specified it will be recursively searched and all sketches will be verified.
91
91
- Parameter: **boardID** - `package:arch:board[:parameters]` ID of the board to be compiled for. e.g. `arduino:avr:uno`. Board-specific parameters are only supported by Arduino IDE 1.5.5 and newer.
92
-
- Parameter: **allowFail** - `true`or `false`. Allow the verification to fail without causing the CI build to fail.
92
+
- Parameter: **allowFail** - `true`, `require`, or `false`. Allow the verification to fail without causing the CI build to fail. `require` will cause the build to fail if the sketch verification doesn't fail.
93
93
- Parameter: **IDEversion** - A single version of the Arduino IDE to use to verify the sketch.
94
94
- Parameter(optional): **IDEversionList** - A list of versions of the Arduino IDE to use to verify the sketch. e.g. `'("1.6.5-r5" "1.6.9" "1.8.2")'`. If no version list is provided all installed IDE versions will be used.
95
95
- Parameter: **startIDEversion** - The start (inclusive) of a range of versions of the Arduino IDE to use to verify the sketch.
# Define a dummy value for arduinoExitCode so that the while loop will run at least once
694
691
local arduinoExitCode=255
695
692
# Retry the verification if arduino returns an exit code that indicates there may have been a temporary error not caused by a bug in the sketch or the arduino command
@@ -700,12 +697,25 @@ function build_this_sketch()
700
697
local verifyCount=$((verifyCount +1))
701
698
done
702
699
703
-
# If the sketch build failed and failure is not allowed for this test then fail the Travis build after completing all sketch builds
704
700
if [[ "$arduinoExitCode"!="0" ]];then
705
-
if [[ "$allowFail"!="true" ]];then
706
-
buildThisSketchExitCode=1
701
+
# Sketch build failed
702
+
if [[ "$allowFail"=="true"||"$allowFail"=="require" ]];then
703
+
# Failure is allowed for this test
704
+
local -r buildThisSketchExitCode=0
705
+
else
706
+
# Failure is not allowed for this test, fail the Travis build after completing all sketch builds
707
+
local -r buildThisSketchExitCode=1
707
708
fi
708
709
else
710
+
# Sketch build succeeded
711
+
if [[ "$allowFail"=="require" ]];then
712
+
# Failure is required for this test, fail the Travis build after completing all sketch builds
713
+
local -r buildThisSketchExitCode=1
714
+
else
715
+
# Success is allowed
716
+
local -r buildThisSketchExitCode=0
717
+
fi
718
+
709
719
# Parse through the output from the sketch verification to count warnings and determine the compile size
0 commit comments