Permalink
Browse files

Arg passing fixes for test.sh and marionette

  • Loading branch information...
1 parent 8345d4b commit 3f8ffcf2f89cf25271b9dafe65ed15b7889763f0 @marshall marshall committed Oct 3, 2012
Showing with 11 additions and 9 deletions.
  1. +1 −1 scripts/marionette.sh
  2. +1 −1 scripts/mochitest.sh
  3. +9 −7 test.sh
View
@@ -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
View
@@ -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`
View
16 test.sh
@@ -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

0 comments on commit 3f8ffcf

Please sign in to comment.