Skip to content

Commit

Permalink
Arg passing fixes for test.sh and marionette
Browse files Browse the repository at this point in the history
  • Loading branch information
marshall committed Oct 3, 2012
1 parent 8345d4b commit 3f8ffcf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/marionette.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
# 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_DIR--type=b2g"
MARIONETTE_FLAGS+=" --homedir=$B2G_DIR --type=b2g"
USE_EMULATOR=yes

# Allow other marionette arguments to override the default --emulator argument
Expand Down
2 changes: 1 addition & 1 deletion scripts/mochitest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ -z $GECKO_PATH ]; then
fi

XRE_PATH=$B2G_DIR/gaia/xulrunner-sdk/bin
MOCHITEST_FLAGS+="--b2gpath $B2G_DIR --xre-path $XRE_PATH"
MOCHITEST_FLAGS+=" --b2gpath $B2G_DIR --xre-path $XRE_PATH"
SCRIPT=$GECKO_PATH/testing/marionette/client/marionette/venv_mochitest.sh

PYTHON=`which python`
Expand Down
16 changes: 9 additions & 7 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@
B2G_HOME=$(cd `dirname $0`; pwd)

usage() {
echo "Usage: $0 [marionette|mochitest]"
echo "Usage: $0 [marionette|mochitest] (frontend-args)"
echo ""
echo "'marionette' is the default frontend"
}

if [[ "$1" = "--help" ]]; then
usage
exit 0
FRONTEND=$1
if [ -z "$FRONTEND" ]; then
FRONTEND=marionette
else
shift
fi

FRONTEND=${1:-marionette}
shift

case "$FRONTEND" in
mochitest)
SCRIPT=$B2G_HOME/scripts/mochitest.sh ;;
marionette)
SCRIPT=$B2G_HOME/scripts/marionette.sh ;;
--help|-h|help)
usage
exit 0;;
*)
usage
echo "Error: Unknown test frontend: $FRONTEND" 1>&2
Expand Down

0 comments on commit 3f8ffcf

Please sign in to comment.