Skip to content

Commit 0795c41

Browse files
committed
Avoid error due to attempting to run the virtual display command on systems that don't have the necessary program
This command is only required for headless operation with older versions of the Arduino IDE. In most cases where sbin/start-stop-daemon doesn't exist this command is not necessary anyway.
1 parent c7c1525 commit 0795c41

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arduino-ci-script.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,8 @@ echo "Build Timestamp (UTC)"$'\t'"Build"$'\t'"Job"$'\t'"Job URL"$'\t'"Build Trig
14071407

14081408
# Start the virtual display required by the Arduino IDE CLI: https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#bugs
14091409
# based on https://learn.adafruit.com/continuous-integration-arduino-and-you/testing-your-project
1410-
/sbin/start-stop-daemon --start $ARDUINO_CI_SCRIPT_QUIET_OPTION $ARDUINO_CI_SCRIPT_VERBOSITY_OPTION --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
1411-
sleep 3
1412-
export DISPLAY=:1.0
1410+
if [ -e /usr/bin/Xvfb ]; then
1411+
/sbin/start-stop-daemon --start $ARDUINO_CI_SCRIPT_QUIET_OPTION $ARDUINO_CI_SCRIPT_VERBOSITY_OPTION --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
1412+
sleep 3
1413+
export DISPLAY=:1.0
1414+
fi

0 commit comments

Comments
 (0)