Bug 1396098 - part 0a - only source xvfb.sh if we need xvfb; r=glandium

No sense doing unnecessary work.
This commit is contained in:
Nick Alexander 2017-09-15 14:52:24 -04:00
Родитель 177dd95e18
Коммит 371e2f7240
1 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -4,8 +4,6 @@ set -x -e
echo "running as" $(id)
. /builds/worker/scripts/xvfb.sh
####
# Taskcluster friendly wrapper for performing fx desktop builds via mozharness.
####
@ -59,15 +57,17 @@ fi
if [[ -z ${MOZHARNESS_SCRIPT} ]]; then fail "MOZHARNESS_SCRIPT is not set"; fi
if [[ -z ${MOZHARNESS_CONFIG} ]]; then fail "MOZHARNESS_CONFIG is not set"; fi
cleanup() {
local rv=$?
cleanup_xvfb
exit $rv
}
trap cleanup EXIT INT
# run XVfb in the background, if necessary
if $NEED_XVFB; then
. /builds/worker/scripts/xvfb.sh
cleanup() {
local rv=$?
cleanup_xvfb
exit $rv
}
trap cleanup EXIT INT
start_xvfb '1024x768x24' 2
fi