Files
tubestation/testing/taskcluster/scripts/tester/harness-test-linux.sh
Maja Frydrychowicz 212e0b801a Bug 1227367 - Add marionette-harness TaskCluster task; r=dustin
marionette-harness is implemented as a "generic" task and
can be triggered with the following try syntax:
`-p linux64_tc -j marionette-harness -u none -t none`

The Marionette harness tests do not depend on a browser build,
they only exercise Python code.

Add option to testing/docker/desktop-build/bin/build.sh to
execute any in-tree script instead of only `build-linux.sh`.
This feature is used to call
testing/taskcluster/scripts/tester/harness-test-linux.sh, which
in turn executes the mozharness script specified in the environment.

MozReview-Commit-ID: H08v8ow4p8q
2016-03-31 15:40:03 -04:00

41 lines
1016 B
Bash

#! /bin/bash -vex
set -x -e
echo "running as" $(id)
####
# Taskcluster friendly wrapper for running a script in
# testing/mozharness/scripts in a source checkout (no build).
# Example use: Python-only harness unit tests
####
: WORKSPACE ${WORKSPACE:=/home/worker/workspace}
: SRC_ROOT ${SRC_ROOT:=$WORKSPACE/build/src}
# These paths should be relative to $SRC_ROOT
: MOZHARNESS_SCRIPT ${MOZHARNESS_SCRIPT}
: MOZHARNESS_CONFIG ${MOZHARNESS_CONFIG}
: mozharness args "${@}"
set -v
cd $WORKSPACE
fail() {
echo # make sure error message is on a new line
echo "[harness-test-linux.sh:error]" "${@}"
exit 1
}
if [[ -z ${MOZHARNESS_SCRIPT} ]]; then fail "MOZHARNESS_SCRIPT is not set"; fi
# support multiple, space delimited, config files
config_cmds=""
for cfg in $MOZHARNESS_CONFIG; do
config_cmds="${config_cmds} --config-file ${SRC_ROOT}/${cfg}"
done
python2.7 $SRC_ROOT/${MOZHARNESS_SCRIPT} ${config_cmds} "${@}"