зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1231200: produce treeherder-compatible errors; r=jmaher
MozReview-Commit-ID: CO4R2LRa23g --HG-- extra : rebase_source : 55a9feb63949060587eee7a9a2f8098e6d3a4d6f
This commit is contained in:
Родитель
fd321807d6
Коммит
877969d5e0
|
@ -15,6 +15,12 @@ if [ $(id -u) = 0 ]; then
|
|||
exec sudo -E -u worker bash /home/worker/bin/test.sh "${@}"
|
||||
fi
|
||||
|
||||
fail() {
|
||||
echo # make sure error message is on a new line
|
||||
echo "[test.sh:error]" "${@}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
####
|
||||
# Now get the test-linux.sh script from the given Gecko tree and run it with
|
||||
# the same arguments.
|
||||
|
@ -25,6 +31,8 @@ cd $WORKSPACE
|
|||
|
||||
script=testing/taskcluster/scripts/tester/test-linux.sh
|
||||
url=${GECKO_HEAD_REPOSITORY}/raw-file/${GECKO_HEAD_REV}/${script}
|
||||
curl --fail -o ./test-linux.sh --retry 10 $url
|
||||
if ! curl --fail -o ./test-linux.sh --retry 10 $url; then
|
||||
fail "failed downloading test-linux.sh from ${GECKO_HEAD_REPOSITORY}"
|
||||
fi
|
||||
chmod +x ./test-linux.sh
|
||||
exec ./test-linux.sh "${@}"
|
||||
|
|
|
@ -28,6 +28,12 @@ echo "running as" $(id)
|
|||
|
||||
set -v
|
||||
|
||||
fail() {
|
||||
echo # make sure error message is on a new line
|
||||
echo "[build-linux.sh:error]" "${@}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
export MOZ_CRASHREPORTER_NO_REPORT=1
|
||||
export MOZ_OBJDIR=obj-firefox
|
||||
export MOZ_SYMBOLS_EXTRA_BUILDID=linux64
|
||||
|
@ -41,8 +47,8 @@ export MOZ_SIMPLE_PACKAGE_NAME=target
|
|||
export LIBRARY_PATH=$LIBRARY_PATH:$WORKSPACE/src/obj-firefox:$WORKSPACE/src/gcc/lib64
|
||||
|
||||
# test required parameters are supplied
|
||||
if [[ -z ${MOZHARNESS_SCRIPT} ]]; then exit 1; fi
|
||||
if [[ -z ${MOZHARNESS_CONFIG} ]]; then exit 1; 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=$?
|
||||
|
@ -74,8 +80,9 @@ if $NEED_XVFB; then
|
|||
retry_count=$(($retry_count + 1))
|
||||
echo "Failed to start Xvfb, retry: $retry_count"
|
||||
sleep 2
|
||||
fi done
|
||||
if [ $xvfb_test == 255 ]; then exit 255; fi
|
||||
fi
|
||||
done
|
||||
if [ $xvfb_test == 255 ]; then fail "xvfb did not start properly"; fi
|
||||
fi
|
||||
|
||||
# set up mozharness configuration, via command line, env, etc.
|
||||
|
|
|
@ -24,10 +24,16 @@ echo "running as" $(id)
|
|||
set -v
|
||||
cd $WORKSPACE
|
||||
|
||||
fail() {
|
||||
echo # make sure error message is on a new line
|
||||
echo "[test-linux.sh:error]" "${@}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# test required parameters are supplied
|
||||
if [[ -z ${MOZHARNESS_URL} ]]; then exit 1; fi
|
||||
if [[ -z ${MOZHARNESS_SCRIPT} ]]; then exit 1; fi
|
||||
if [[ -z ${MOZHARNESS_CONFIG} ]]; then exit 1; fi
|
||||
if [[ -z ${MOZHARNESS_URL} ]]; then fail "MOZHARNESS_URL is not set"; 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
|
||||
|
||||
mkdir -p ~/artifacts/public
|
||||
|
||||
|
@ -47,14 +53,15 @@ cleanup() {
|
|||
trap cleanup EXIT INT
|
||||
|
||||
# Unzip the mozharness ZIP file created by the build task
|
||||
curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL
|
||||
if ! curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL; then
|
||||
fail "failed to download mozharness zip"
|
||||
fi
|
||||
rm -rf mozharness
|
||||
unzip -q mozharness.zip
|
||||
rm mozharness.zip
|
||||
|
||||
if ! [ -d mozharness ]; then
|
||||
echo "mozharness zip did not contain mozharness/"
|
||||
exit 1
|
||||
fail "mozharness zip did not contain mozharness/"
|
||||
fi
|
||||
|
||||
# start up the pulseaudio daemon. Note that it's important this occur
|
||||
|
@ -85,8 +92,9 @@ if $NEED_XVFB; then
|
|||
retry_count=$(($retry_count + 1))
|
||||
echo "Failed to start Xvfb, retry: $retry_count"
|
||||
sleep 2
|
||||
fi done
|
||||
if [ $xvfb_test == 255 ]; then exit 255; fi
|
||||
fi
|
||||
done
|
||||
if [ $xvfb_test == 255 ]; then fail "xvfb did not start properly"; fi
|
||||
fi
|
||||
|
||||
if $START_VNC; then
|
||||
|
|
Загрузка…
Ссылка в новой задаче