Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 52 lines (41 sloc) 1.28 KB
#!/bin/bash
. setup.sh
# Determine the absolute path of our location.
B2G_HOME=$(cd `dirname $0`; pwd)
# Use default Gecko location if it's not provided in .config.
if [ -z $GECKO_PATH ]; then
GECKO_PATH=$B2G_HOME/gecko
fi
# Run standard set of tests by default. Command line arguments can be
# specified to run specific tests (an individual test file, a directory,
# or an .ini file).
TEST_PATH=$GECKO_PATH/testing/marionette/client/marionette/tests/unit-tests.ini
MARIONETTE_FLAGS+=" --homedir=$B2G_HOME --type=b2g"
USE_EMULATOR=yes
# Allow other marionette arguments to override the default --emulator argument
while [ $# -gt 0 ]; do
case "$1" in
--address=*|--emulator=*)
MARIONETTE_FLAGS+=" $1"
USE_EMULATOR=no ;;
--*)
MARIONETTE_FLAGS+=" $1" ;;
*)
MARIONETTE_TESTS+=" $1" ;;
esac
shift
done
if [ "$USE_EMULATOR" = "yes" ]; then
if [ "$DEVICE" = "generic_x86" ]; then
ARCH=x86
else
ARCH=arm
fi
MARIONETTE_FLAGS+=" --emulator=$ARCH"
fi
MARIONETTE_TESTS=${MARIONETTE_TESTS:-$TEST_PATH}
echo "Running tests: $MARIONETTE_TESTS"
SCRIPT=$GECKO_PATH/testing/marionette/client/marionette/venv_test.sh
PYTHON=`which python`
echo bash $SCRIPT "$PYTHON" $MARIONETTE_FLAGS $MARIONETTE_TESTS
bash $SCRIPT "$PYTHON" $MARIONETTE_FLAGS $MARIONETTE_TESTS
Something went wrong with that request. Please try again.